I'm in this scenario pretty often and I don't know what to do.
- I was changed something in a branch. Commited & pushed.
- I was still working on same branch and somebody commited & pushed.
- I was done changing and did git commit -m "Blabla" and pushed.
- Git refused to push because repository is ahead and I may loose some changes
My idea is to:
- Go pre git commit -m "blabla" (<- this is where I'm stuck)
- stash changes
- Pull latest changes from repo
- Merge stash with working directory
- Commit once more
- Push
How do you resolve such "conflicts", or what is the best thing to do in this situation?