There is a remote repository on bitbucket. I commit to it from the local machine, then from the remote server I request changes. I use TortoiseGit locally, if that. The repository is simple as a door, no branches, just commits one by one. At some point, put the checkbox "Amend last commit", then forgot to remove and so puschil. From that moment on the remote server began some kind of rake. For a start, the registration fell off, I had to re-start my nickname and email. After that, it seemed to be normal, but with each git pull origin master it displays a message to me in a text editor:

# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit. 

I have already entered there different things, saved, but he does not let up. Every pull is followed by this request. What does he need, and what could suddenly break from the harmless "Amend last commit"?

  • Look at the history of commits in the tree - it will be instructive ... - Pavel Mayorov
  • Attach output $ git status - aleksandr barakin
  • "put the checkbox" Amend last commit ", then forgot to remove and so pusher" - git would refuse to "so push". Are you sure that he really started? - D-side
  • www @ site: ~ / sites / fidea $ git status on the branch master on the local server and on the remote server - azz
  • @PavelMayorov take.ms/EjmUI everything is linear - azz

1 answer 1

on the machine where you get the offer to make a merge, the history of changes in the local storage is different from what is in the intermediate storage (on the bitbucket.com server) and in the storage on your work computer.

you can see the differences in history, for example, like this (perform on the machine where you get the offer to merge):

 $ git log origin/master...master 

You can see the differences in the contents of files, for example, like this:

 $ git diff origin/master...master 

to stop doing a merge regularly:

if you need these changes, you need to send them to the intermediate storage

 $ git push 

if you don’t matter, you can opt out of them by moving the pointer (“branch”, “branch”) to the same commit where origin/master points to:

 $ git reset origin/master 
  • It helped. But why suddenly out of sync? How can you find out? I will add that the remote server can only receive commits, it does not have rights to push. - azz
  • You made a commit on this machine. and they didn't send him anywhere. that's the "out of sync" history. How to find out what kind of commit it was and what was changed in it - I wrote in the answer. - aleksandr barakin