Re: [git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-12 Thread Maheshwaran A N
Requirement is to keep all the changes of INT. When you have multiple files 
to solve the conflicts and you very well know which branch to retain, then 
why not use ours/theirs? Whats dangerous here? User is very clear on what 
needs to be retained. Also, if you retain INT content, there is no much 
impact in master since INT is branched out from master as a base(Ideally, 
master is untouched). Therefore, INT is master+newcontents and i hope thats 
well tested in INT branch itself. 

And, the original question is concerned with solving merge conflicts. I 
guess ours/theirs solves the purpose. 

Regards,
Mahe

On Thursday, 13 July 2017 03:27:06 UTC+5:30, Igor Djordjevic wrote:
>
> 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 : 
>>
> > 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 
>> an 
>> >> month and all the developers pushed the code to INT , obviously INT 
>> branch 
>> >> ahead of comments then the master. 
>> >> 
>> >> Now while we try to push the code to the Master it shows conflicts, 
>> how to 
>> >> 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 
>> INT 
>> > (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 
>> solving 
>> > the conflicts. Execute the below command 
>> > 
>> > git checkout --theirs  
>>
>> wow, wasn't aware of that! Many thanks! 
>>
>> /Yubin 
>>
>> > git add  
>> > 
>> > Now, you can check in master branch for INT contents for conflicted 
>> file. 
>>
>
> 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. 
>
> Regards,
> Buga
>

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-12 Thread Maheshwaran A N
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 INT 
(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 
solving the conflicts. Execute the below command

git checkout --theirs  
git add  

Now, you can check in master branch for INT contents for conflicted file. 



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 an 
> month and all the developers pushed the code to INT , obviously INT branch 
> ahead of comments then the master.
>
> Now while we try to push the code to the Master it shows conflicts, how to 
> 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
>
>

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Re: "Deleted by us" while cherry-picking a gerrit in the same project

2017-07-12 Thread Maheshwaran A N
'deleted by us' means the file is deleted in the commit which you are 
trying to do a cherry-pick. It is not file is deleted by you. Git tells 
that the file was deleted in some other commit, and allows you to decide to 
retain it (git add) or to remove it. You can do git cherry-pick --continue 
once you sort this out. 

On Tuesday, 26 March 2013 05:08:55 UTC+5:30, python...@gmail.com wrote:
>
>
> I am trying to cherry-pick a gerrit based on git project test.git ,for 
> some gerrits I see it tries to delete as below by creating one more "test" 
> folder inside the test directory..any idea what could be wrong here?please 
> let me know if you need more details.
>
>
> Unmerged paths:
> #   (use "git add/rm ..." as appropriate to mark resolution)
> #
> #   deleted by us:  test/ROE/SEME/src/cmpc/cmpc.c
>

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-12 Thread Yubin Ruan
2017-07-12 20:40 GMT+08:00 Maheshwaran A N :
> 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 INT
> (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 solving
> the conflicts. Execute the below command
>
> git checkout --theirs 

wow, wasn't aware of that! Many thanks!

/Yubin

> git add 
>
> Now, you can check in master branch for INT contents for conflicted file.
>
>
>
> 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 an
>> month and all the developers pushed the code to INT , obviously INT branch
>> ahead of comments then the master.
>>
>> Now while we try to push the code to the Master it shows conflicts, how to
>> 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
>>
> --
> 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 to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Re: How to avoid merge conflicts while merging INT changes into Master

2017-07-12 Thread Igor Djordjevic
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  >: 
>
> 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 
> an 
> >> month and all the developers pushed the code to INT , obviously INT 
> branch 
> >> ahead of comments then the master. 
> >> 
> >> Now while we try to push the code to the Master it shows conflicts, how 
> to 
> >> 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 
> INT 
> > (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 
> solving 
> > the conflicts. Execute the below command 
> > 
> > git checkout --theirs  
>
> wow, wasn't aware of that! Many thanks! 
>
> /Yubin 
>
> > git add  
> > 
> > Now, you can check in master branch for INT contents for conflicted 
> file. 
>

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. 

Regards,
Buga

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Re: "Deleted by us" while cherry-picking a gerrit in the same project

2017-07-12 Thread Igor Djordjevic
Hi Maheshwaran,

On Wednesday, July 12, 2017 at 2:34:44 PM UTC+2, Maheshwaran A N wrote:
>
> 'deleted by us' means the file is deleted in the commit which you are 
> trying to do a cherry-pick. It is not file is deleted by you. Git tells 
> that the file was deleted in some other commit, and allows you to decide to 
> retain it (git add) or to remove it. You can do git cherry-pick --continue 
> once you sort this out.
>

This is incorrect -- it`s exactly the opposite, as the other two answers 
already pointed out.

The file is deleted by you, in your branch in which you`re trying to 
cherry-pick into, and the commit you`re trying to cherry-pick actually 
still has that file and contains some changes for it.

So you get to resolve the conflict by either reintroducing the file in your 
branch (accepting its state from the commit you`re cherry-picking), or you 
get to confirm the file should really stay deleted... as already explained 
in previous messages.

Oh, and this topic is from 2013/2014... just saying :)

Regards,
Buga

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.