How is it possible to push to origin/master but commits land in origin/some-branch?

Pedro Roson June 14, 2017

Situation:

  • Team with several members
  • One member starts a branch
  • Another one makes a commit that goes to that branch
  • 3 other members are making commits (with git cmd & Idea) and pushing to master, but actually those commits are going to this branch (they don't realize about this)
  • Person who made the commit, clones a fresh copy, commits& pushes again, correctly to master.
  • Another team member commits & pushes correctly to master unadvertently. His previous commits had gone to the branch.
  • At some point we realize of this. Checking local working copies, commits are in master & origin/master, checking bitbucket page they are on this other branch
  • Fetching we get actual remote status in our local with no issues
  • One of us cherry picked all the commits that should be on master to master, pushed them and every thing went alright

How is this possible in general? What's the mecanism that allows this behavior? 

For some time working copies were pushing to their origin/master, although commits were landing in origin/some-branch.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events