
gitを操作するとき、どの場面でどのコマンドを打つのか、
しばらく使わないでいたらすぐ忘れてしまうので、
せめて基本的な所だけでもすぐ思い出せるようにチャート図みたいなのを作ってみました。
コマンド
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
$ git init $ git status $ git log $ git log --oneline $ git add . $ git commit -m "first commit" $ git branch $ git branch [rev1] $ git checkout [rev1] $ git checkout -b [rev1] $ git diff $ git rm / git mv $ git add . $ git commit -m "2nd commit" $ git checkout master $ git commit --amend $ git revert HEAD $ git merge [rev1] $ git merge -d [rev1] $ git reset --hard HEAD $ git reset --hard HEAD^ $ git reset --hard ORIG_HEAD $ git reflog $ git reset --hard HEAD@{[1]} |
こういうブログもありました。
- 今日学んだこと「2016年4月20日」
- 僕のhistoryの設定(Ubuntu & bash)
- Mac Snow Leopardにtreeコマンドをインストール
- historyコマンドを簡単に使う
- ニッカンツイッター 2011-12-09(CodaでEmacsのコマンド(追加))
人気のあるブログ:
- 新しいgemのアップデート方法(rubygems-update)
- Coda2でscssを使うときのお供にcompassをどうぞ。
- bashでUTF-8に設定して日本語表示したり使ったり。Emacsでも。
- NginxをSSL付きで動かすために設定したこと
- Macでフォルダを結合したいとき