PC-UNIXに関する記事など
gitにおいて本来管理する必要の無いゴミファイルを誤ってコミットしてしまった場合ゴミファイルのみ取り消す方法を考える。
$ git rm gomifile
$ git rm --cached gomifile
又ファイル自体は必要なのに間違ってファイルまで削除してしまった場合は以前のコミットからcheckoutで消したファイルを復活できます。
$ git rm gomifile $ ls . .. $ git log commit b14541a85e88909c6227131483038a09d672c772 Author: User tarou yamadaDate: Fri Mar 16 11:09:08 2012 +0900 gomifile add $ git checkout b14541a gomifile $ ls . .. gomifile
トラックバックURL: http://www.omakase.org/mt/mt-tb.cgi/86
コメントする