我是git的新手,我一直在努力理解为什么git在我运行git checkout以在分支之间切换时,在另一个分支的一个分支中继续显示我更改的内容首先我尝试不使用git add并且不起作用.但是,我尝试使用git add,但没有解决问题.我还没有使用git commit.
这基本上就是我在做的事情:
$ git clone <a_repository>
$ git branch
* master
$ git branch testing
$ git checkout testing
...edit a file, add a new one, delete...
$ git status
# On branch testing
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: file1.txt
#
# Untracked files:
# (use "git add <file>..." to …Run Code Online (Sandbox Code Playgroud) git ×1