LoginSignup
1
1

More than 5 years have passed since last update.

git 覚書

Posted at

個人で使う場合はこれぐらい覚えていればいいかな。
全体が見通せない規模になってきたら branch も覚える。
ローカルで完結できるのは良い。

workTree -> (add) -> stagingArea -> (commit) -> repository

workTree <- (checkout) <- stagingArea <- (reset) <- repository

workingTree
stagingArea =? index
repository =? HEAD

git init

git add <file>
git commit -m 'comment'

git diff
git diff --cached
git diff HEAD

git checkout -- <file> # -- は現在のブランチ名を省略している?
git reset HEAD <file>

参考

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1