Git使用開始から1週間で使ったコマンド
4月からの新環境で一番苦労しているのがこのGitであることは間違いない。
忘れないように、使ったコマンドをメモしておくことにする。
他人に全く優しくない自分仕様のエントリーで大変申し訳ない。
$ git st
と打つと、変更のあったファイルの一覧が表示される
log --graph --all --color --pretty='%x09%h %cn%x09%s %Cred%d%Creset'
でツリー表示
git rm (ファイル名)
でファイル削除
git commit -m '(コミット名)'
コミット
git add (ディレクトリ名)
加える
git commit -m '(コミット名)'
コミット
git rebase -i HEAD~6
各ステータスを確認、変更
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
amend or continue
git reset --soft HEAD~
HEADの一つ前のコミットを取り消す
$ git diff
メインリポジトリとの差異を表示
$ git branch -D (ブランチ名)
(ブランチ名)を削除