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
amend or continue
You can amend the commit now, withgit commit --amend
Once you are satisfied with your changes, run
git rebase --continue
HEADの一つ前のコミットを取り消す
git reset --soft HEAD~
メインリポジトリとの差異を表示
$ git diff
(ブランチ名)を削除
$ git branch -D (ブランチ名)