0

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" を実行しましたが、コミットのためにステージングされています:

# 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")
4

2 に答える 2

1

削除をステージングしました。今度は でコミットしgit commitます。

于 2013-08-23T19:27:06.837 に答える
0

簡単な答え:を使用git commitして変更をコミットします。

より長い回答:新しいファイルは既にコミットされているようです。ファイルが移動したことを git で確認したい場合は、以前のコミットを修正したほうがよいかもしれません。新しいファイルをコミットしてから他のコミットを行っていないと仮定すると、次のコマンドを使用してこれを行うことができます。

git commit --amend -C HEAD
于 2013-08-23T19:30:00.730 に答える