On Wednesday, July 12, 2017 at 6:38:35 PM UTC+2, Yubin Ruan wrote:
> 2017-07-12 20:40 GMT+08:00 Maheshwaran A N <avpal...@gmail.com
> On Tuesday, 11 July 2017 07:36:47 UTC+5:30, Anjaiah Yamagani wrote:
> >> Hi Team,
> >> I have very quick question - as I'm new to the git
> >> we have master branch.
> >> and checked out the INT branch from the master, worked on the INT for
> >> month and all the developers pushed the code to INT , obviously INT
> >> ahead of comments then the master.
> >> Now while we try to push the code to the Master it shows conflicts, how
> >> avoid this.
> >> at this stage I do not want to see the conflicts and work with the
> >> developers at this stage and resolve the merge conflicts.
> >> can you suggest are we doing any wrong thing here.
> >> Regards,
> >> Anjaiah
> I suppose you are trying to execute the below commands.
> > git checkout master
> > git merge origin/INT (taking changes from remote branch) or git merge
> > (merge with local changes)
> > At this point you would have faced the conflicts.
> > In this case, if you want to retain the changes of INT, you can take the
> > changes from INT and apply it in master without opening the file and
> > the conflicts. Execute the below command
> > git checkout --theirs <path/to/conflictfiles>
> wow, wasn't aware of that! Many thanks!
> > git add <path/to/conflictfiles>
> > Now, you can check in master branch for INT contents for conflicted
I`m not sure how this helps resolving merge conflicts, as it doesn`t only
retain all changes from INT, but effectively nukes all changes from master
branch and just takes INT branch file state as-is -- so you`re not
"applying it in master", but deleting master changes altogether.
Doing this is dangerous, unless you really want to drop all master branch
changes that happened since you branched your INT branch...
Am I missing something?
If this is exactly what you wanted to point out (dropping all master
changes and taking INT file as-is), then let this be just an additional
note of warning for those that might have missed it, as the original
question seems concerned with solving something else - a real merge
conflict situation, and this answer doesn`t seem to help there.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.