Yanor.net/
Wiki
Blog
GitHub
Sandbox
開始行:
* コミットを取り消す(過去のコミットに戻す) [#l4699c88]
*** コミットを取り消す(前回のコミットに戻す) [#pd3cc38f]
vi test.txt # (1) test.txtを修正する
git add test.txt # (2) test.txtをステージングする
git commit -m 'fixed' # (3) コミットする
git reset --hard HEAD^ # (4) コミットを取り消す(HEADを...
# コミットログ'fixed'は消え、...
test.txt以外のファイルを修...
*** (コミットして時間が経っていて、すでに他者が修正を行...
自分:
git commit -am 'XXX'
git push
他者:
git pull
git commit -am 'XXX'
自分:
git revert HEAD
git push
(他者)
git pull
終了行:
* コミットを取り消す(過去のコミットに戻す) [#l4699c88]
*** コミットを取り消す(前回のコミットに戻す) [#pd3cc38f]
vi test.txt # (1) test.txtを修正する
git add test.txt # (2) test.txtをステージングする
git commit -m 'fixed' # (3) コミットする
git reset --hard HEAD^ # (4) コミットを取り消す(HEADを...
# コミットログ'fixed'は消え、...
test.txt以外のファイルを修...
*** (コミットして時間が経っていて、すでに他者が修正を行...
自分:
git commit -am 'XXX'
git push
他者:
git pull
git commit -am 'XXX'
自分:
git revert HEAD
git push
(他者)
git pull
ページ名: