- Git - Working Tree,Index and repository
- Q1.
git diff
とgit diff --cached
の違いは? - Q2. stagingとは?
- Q3.
git reset
でできることは?
- Q1.
# commit logをフォマット指定して見る
$ git log --pretty=format: "%h %cd %cn %s"
# print log formatted ${commit hash short version} ${date} ${author} ${commit message}
# git stash working tree を一時退避
$ git stash save "stash some-branch's commits"
# list stash
$ git stash list
stash[{0]: On some-branch-name: stash some-branch commits"
# apply and remove from stash's list
$ git stash pop [(optional)stash@\{0\}]
# only apply without removing from stash's list
$ git stash apply [(optional)stash@\{0\}]
# remove stash of stash@{0}
$ git stash drop
# remove all stash list
$ git stash clear
# git の他branchの特定コミットのみマージ
$ git cherry-pick <commit-id>
# exclude .git to make dist
$ git checkout-index -a -f --prefix=here-is-dist-directory-name/
- diff Viewer
- Q1. 任意のコミット間でのdiffをみるには?
- Q2. コミット差分にスペースによる差分を表示させなくするにはどうしたら良い?→GETパラメータ
w=1
をつける。