I've recently had to switch to git from mercurial and my normal workflow has become incredibly annoying to replicate, so I'm looking for some pointers. Happy to answer anything I miss here. But what I like to do is as follows:
- On master, pull to get all recent changes.
- create my working branch off master.
- Do work essentially just amend everything to my first commit.
- push the change for review.
- Address issues, again amend, and then re-push
- If I somehow get behind the master branch, I usually just pull all the changes to master to have my branch just sit on top of them to avoid merge conflicts prior to landing.
- land.
My question:
So, I've abandoned my constant ammending due to gits structure which is fine. So now after any comments I make a new commit. The real issue happens when I get behind master. I usually commit my changes. Go to master. git pull. Switch back to my branch git rebase master and try to re-push my changes. This, for some reason always breaks with the following "my branch is behind its remote counterpart". What am i missing here?
Thanks