如果我运行 git status:
# On branch new-media
# 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: .gitignore
# modified: app/views/layouts/application.html.erb
然后我结帐主人:git checkout master
M .gitignore
M app/views/layouts/application.html.erb
Switched to branch 'master'
以前,git 阻止我检查其他分支,提示我存储或提交我对当前分支所做的更改。现在,它不再这样做了。