|Re: Unstaging changes during a merge [message #930403 is a reply to message #929876]
||Tue, 02 October 2012 09:25
| Christian Halstrick
Registered: July 2009
When you unstage something in the EGit staging view then what happens is similar to a native git 'git reset <filename>'. And native git of course allows you to do that also on already merged files. We really need this option. The way how you solve conflicts may influence your decision whether you want merged file content on other files or not. |
Here is how you unstage with native git:
echo -e 'line1\nline2\nline3' > a
echo -e 'line1\nline2\nline3' > b
git add a b
git commit -m "adding a,b"
git checkout -b side
echo -e 'line1\nline2(side)\nline3' > a
echo -e 'line1\nline2\nline3(side)' > b
git commit -a -m "modifying a,b on side"
git checkout master
echo -e 'line1\nline2(master)\nline3' > a
echo -e 'line1(master)\nline2\nline3' > b
git commit -a -m "modifying a,b on master"
git merge side
echo -e 'line1\nline2(combined)\nline3' > a
git reset b
Powered by FUDForum
. Page generated in 0.02717 seconds