git rebase学习理解

在学习git用法时候,看到rebase,就测试了下。
git clone [email protected]: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

Created with Raphaël 2.1.2 origin c0a13d-c1 66a7eb-c2 master

git branch mywork
git branch

Created with Raphaël 2.1.2 origin c0a13d-c1 66a7eb-c2 branch now master mywork yes no
Created with Raphaël 2.1.2 Start My Operation Yes or No? Good idea catch something... End Stuff My Subroutine yes no yes no

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

Created with Raphaël 2.1.2 start c0a13d-c1 66a7eb-c2 ef1c97-c3 b24c7c-c4 816c1d-c5p 32f1e7-c6p mywork

猜你喜欢

转载自blog.csdn.net/juewuer/article/details/78832277