假设我已经提交了四个提交,它们依次是c1、c2、c3、c4。现在我正在签出c1提交,但是我决定返回到C4 (假设我已经存储了c4的提交ID )。如果我直接从c2跳到c4,c3和c1的提交会被反映出来吗?
发布于 2015-08-22 17:13:18
我尝试了从命令行,它确实反映了c2和c3。
~$ mkdir test
~$ cd test/
~$ git init
~$ touch test.txt
~$ echo "1" >> test.txt
~$ git add .
~$ git commit -m 'c1'
~$ echo "2" >> test.txt
~$ git commit -am 'c2'
~$ echo "3" >> test.txt
~$ git commit -am 'c3'
~$ echo "4" >> test.txt
~$ git commit -am 'c4'
~$ git log
~$ git checkout e3c8d3fdede3c62cbbd023961d3b6eec8aa6c47d
~$ cat test.txt
~$ git checkout 410bf3153ed1a74a1a29cccb41666dfd0eab0862
~$ cat test.txthttps://stackoverflow.com/questions/32158416
复制相似问题