0

私は次のことをしました(学ぶためにgit rm)。

空のフォルダーに空のリポジトリを作成しました。test.txt というファイルを作成し、それを変更してから、次のコマンドを実行します (結果が得られます)。

git rm test.txt -> `fatal: pathspec 'test.txt' did not match any files`

git add test.txt && git rm test.txt -> 
error: 'test.txt' has changes staged in the index
                   (use --cached to keep the file, or -f to force removal)

だから、私の質問は:

git rmtest.txt が実際に役立つのはいつですか?

4

1 に答える 1