我在这种情况下有一个git目录:
ProgSoul@PROGSOUL-LENOVO:~/esercizio3_2$ git status
Sul branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: A
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: A
Untracked files:
(use "git add <file>..." to include in what will be committed)
B
Run Code Online (Sandbox Code Playgroud)
在这种情况下,我有:
我的老师希望我暂时中止工作,创建一个BUGFIX文件,提交并恢复以前的状态。
我通过以下命令实现了它:
git stash --include-untracked
touch BUGFIX
git add BUGFIX
git …Run Code Online (Sandbox Code Playgroud)