Hello,
My team recently moved to git from SVN and we are having a strange problem with the workflow. In our development cycle we use Bitbucket and TortoiseGit and a Standard Git Flow like strategy.
The main problem is that, after we resolve the conflicts (the way Bitbucket suggests), in the differences page of the commits we see changes that were not committed and pushed.
The way we resolve the conflicts is:
1- in TortoiseGit we switch to the branch we develop (the feature branch) (henceforth known as: the current branch)
2- we make a pull from the branch we want to merge into (aka: the destination branch)
3- open the "edit conflicts" window/tab
4- pick which version to use for that particular file
5- save file and mark that conflict as resolved
6- commit the modifications we made in the current branch; by default TortoiseGit selects all the changes/modified files we have on the repository even though we don't want to commit all the development configs and dependencies we have on our environment, so we deselect everything and pick only the files on which the conflict appeared.
7- we push the commit to the remote repository (Bitbucket)
8- spend hours to reverts files manually that should not have been committed
and pray that we did not loose any code in the process (from the source branch or the destination branch)
As a side-note to step 6:
In the commit window (where we pick what files to commit) we see stuff modified even though we did not modify them in the current branch, but I think they were modified in the destination branch. Something tells me this is where we mess-up, maybe Git thinks that if we don't commit them we say that our version of the file (the older than what we have on the destination branch) is the correct one.
Also, if we select to commit a file that was not modified in the current branch but was on the destination branch, MOST OF THE TIME it looks like it recommits the file from the destination branch into the current branch. We could try to manually look at what was updated in the destination branch and select them for commit, but usually there are hundred of flies modified each time, so this approach defeats the point of using a Version Control System and having separate branches with automatic merges.
Can someone explain why this is happening and how to avoid this situation (maybe a different way to resolve the conflicts). Maybe I misunderstood what Git or Bitbucket is doing behind the scenes (I personally would expect only stuff that I committed to appear in the pull request but maybe the local version gets committed without us explicitly selecting it)
Thank you,
Signed: A confused developer