We are working with git for version control. Every developer is assigned a clone of the master to work with their development. The usual process we follow for committing to master is git stash save,taking latest pull of master ,git stash pop ,git commit ,git push to master.Problem arises when 2 developer are working with same file but different methods and when we do git stash pop we get conflict errors saying git stash pop was unsuccessful. Is there any way to resolve the conflicts automatically (since file is same but methods are different)then do a git push to master .
Asked
Active
Viewed 461 times
0
-
1Possible duplicate of [How to resolve merge conflicts in Git?](http://stackoverflow.com/questions/161813/how-to-resolve-merge-conflicts-in-git) – Mritunjay Dec 17 '16 at 15:06
-
1Erm, I don't think stash -> pull -> unstash is really that good. For precisely the reason you encountered. Just commit your changes and rebase - git will do the automatic merging for you. Well, unless it fails but generally it's fine if you don't touch the same lines. – VLAZ Dec 17 '16 at 15:06
1 Answers
0
Is there any way to resolve the conflicts automatically?
By its very definition, a conflict in source control systems is a situation when two sets of changes cannot be merged automatically.
A user (i.e. a human being) must review the changes and resolve the conflict by combining the changes or by selecting one change in favour of the other.

axiac
- 68,258
- 9
- 99
- 134