我从file1重新命名了一个文件 - > file2,git status显示:
# On branch master
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: pathname/file1.xml
我做了一个git rm“pathname / file.xml”,它是为commit提交的:
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# deleted: pathname/file.xml
如何删除此文件?
在我提交并改变之后,我正在
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add <file>..." to mark resolution)
added by us: path/file1.xml
no changes added to commit (use "git add" and/or "git commit -a")
答案 0 :(得分:1)
您已暂停删除,现在使用git commit
提交。
答案 1 :(得分:0)
简答:使用git commit
提交更改。
更长的回答:看起来您已经提交了新文件。如果你想让git看到文件移动了,那么修改你之前的提交可能会更好。假设您在提交新文件后未进行任何其他提交,则可以使用以下命令执行此操作:
git commit --amend -C HEAD