我从file 1->file 2重命名了一个文件,git状态显示:
# 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 "pathname/file.xml“,它用于提交:
# 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")发布于 2013-08-23 19:30:00
简短回答:使用git commit提交更改。
更长的答案:,看起来您已经提交了新文件。如果希望git看到文件移动,最好修改以前的提交。假设自提交新文件以来没有进行任何其他提交,则可以使用以下命令执行此操作:
git commit --amend -C HEAD发布于 2013-08-23 19:27:06
您已经进行了删除,现在将其提交给git commit。
https://stackoverflow.com/questions/18410399
复制相似问题