A couple of comments:
master.
, rebase, ( ", " ), .
git :
-C<n>
<n> .
, .
.
(, PowerShell, Git1.6.5.1, Xp)
genfile.bat
echo hello, World %1 > afile.txt
echo hello, World %2 >> afile.txt
echo hello, World 3 >> afile.txt
echo hello, World 4 >> afile.txt
echo hello, World 5 >> afile.txt
:
PS D:\git\tests\mergeLines> git init m0
PS D:\git\tests\mergeLines> cd m0
PS D:\[...]\m0> D:\git\tests\mergeLines\genfile.bat 1 2
PS D:\[...]\m0> git add -A
PS D:\[...]\m0> git ci -m "afile to be modified concurrently"
:
hello, World 1
hello, World 2
hello, World 3
hello, World 4
hello, World 5
PS D:\[...]\m0> git co -b abranch
PS D:\[...]\m0> D:\git\tests\mergeLines\genfile.bat 1 2_modified
PS D:\[...]\m0> git ci -a -m "afile modified in abranch"
:
hello, World 1
hello, World 2_modified
hello, World 3
hello, World 4
hello, World 5
master
PS D:\[...]\m0> git co master
PS D:\[...]\m0> D:\git\tests\mergeLines\genfile.bat 1_master 2
PS D:\[...]\m0> git ci -a -m "afile modified in master"
:
hello, World 1_master
hello, World 2
hello, World 3
hello, World 4
hello, World 5
, (.. abranch master)
PS D:\[...]\m0> cd ..
PS D:\git\tests\mergeLines> git clone m0 m1
PS D:\git\tests\mergeLines> cd m1
PS D:\[...]\m1> git co -b abranch origin/abranch
PS D:\[...]\m1> git co master
PS D:\[...]\m1> git merge abranch
:
Auto-merging afile.txt
CONFLICT (content): Merge conflict in afile.txt
Automatic merge failed; fix conflicts and then commit the result.
PS D:\[...]\m1> type afile.txt
<<<<<<< HEAD
hello, World 1_master
hello, World 2
=======
hello, World 1
hello, World 2_modified
>>>>>>> abranch
hello, World 3
hello, World 4
hello, World 5
, , abranch master, :
PS D:\[...]\m1> cd ..
PS D:\git\tests\mergeLines> git clone m0 m2
PS D:\git\tests\mergeLines> cd m2
PS D:\[...]\m2> git co -b abranch origin/abranch
PS D:\[...]\m2> git rebase -C0 master
:
hello, World 1_master
hello, World 2_modified
hello, World 3
hello, World 4
hello, World 5
master abranch, .
PS D:\git\tests\mergeLines\m2> git co master
Switched to branch 'master'
PS D:\git\tests\mergeLines\m2> git merge abranch
Updating c8f48b4..8bee1d2
Fast forward
afile.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)