在学习git用法时候,看到rebase,就测试了下。
git clone git@newgit.op.ksyun.com:LIHECHAO/test-rebase.git
cd test-rebase/
git checkout master
echo c1 >c1.txt
git add c1.txt
git commit -m “c1”
echo c2 > c2.txt
git add c2.txt
git commit -m “c2”
git log
git log –pretty=tformat: –numstat
git branch mywork
git branch
echo c3 >c3.txt
git add c3.txt
git commit -m “c3”
echo c4 >c4.txt
git add c4.txt
git commit -m “c4”
git log
git log –pretty=tformat: –numstat
git checkout mywork
git branch
echo c5 >c5.txt
git add c5.txt
git commit -m “c5”
echo c6 >c6.txt
git add c6.txt
git commit -m “c6”
git log
git log –pretty=tformat: –numstat
git checkout master
git branch
git checkout mywork
git branch
git log
git log –pretty=tformat: –numstat
git rebase master
git branch
git log
git log –pretty=tformat: –numstat