We have three branches for different versions of our software, let's say A, B, C. A is old, just doing bugfixes there, B is currently released, and C is future version, A is merged into B, and B is merged into C, if there are issues to be propagated. I'v done some fixes in branch A, which should be propagated. Accidentally I did an error:
$ git push origin origin/A Total 0 (delta 0), reused 0 (delta 0) To ssh://xxxxx.xx/home/git/work.git/ * [new branch] origin/A -> origin/A ^^^ this is for sure error, I wanted: git push origin A (I miscopy more than I wanted), but I am not sure what happened, frankly I haven't notice the error, just going to propagate fix to B $ git checkout B Checking out files: 100% (314/314), done. Switched to branch 'B' Your branch is ahead of 'origin/B' by 1 commit. $ git merge origin/A Already up-to-date. ^^^here I'v noticed something wrong (again origin/A instead of A), I haven't expect any trap, so I repeat: $ git checkout A Switched to branch 'A' Your branch is ahead of 'origin/A' by 2 commits. $ git push origin A To ssh://xxxxx.xx/home/git/work.git/ ! [rejected] A -> A (non-fast-forward) error: failed to push some refs to 'ssh://xxxxx.xx/home/git/work.git/' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details. ^^^OK somebody else push something, going to pull, still no trap expected $ git pull origin A ^^^now there are commits from C branch (like somebody have merged C into A), which is wrong I have two questions: 1) is there a way to "fix"? 2) Am I the trouble maker (due to origin/A instead of A) or the guilty is somebody else? If somebody else, how to identify him? -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.