ホーム » git » git commit 関連

git commit 関連

commitの一覧表示

[code]
git log
[/code]

直近のcommitの内容表示

[code]
git log -1
[/code]

直近のcommitの対象ファイル一覧

[code]
git log -1 –name-only
[/code]

直近のcommitの取り消し 編集したファイルは変更しない

[code]
git reset –soft HEAD~
[/code]

[code]
HEAD~とHEAD^は同じ
[/code]

直近のcommitの取り消し 編集したファイルも元に戻す

[code]
git reset –hard HEAD~
[/code]