Discuss / Git / 困惑我好几十年了,求解

困惑我好几十年了,求解

洋火2005

#1 Created at ... [Delete] [Delete and Lock User]

首先,我有一个文件test.txt. 我添加内容为: this is A.

git checkout -b dev   

vi test.txt修改文件内容为 this is B.

未add和commit,git checkout master   此时cat test.txt ,显示为this is B.

接下来来到dev,git checkout dev ,更改文件内容为 this is C.

git add test.txt  /  git commit test.txt -m "this is C"

最后在master上分支查看test.txt内容,此时却显示为this is A.

现在好像也不能通过dev分支推送到远程仓库。

求解释!


  • 1

Reply