Git Status

branch diverged

On branch master
Your branch and 'origin/master' have diverged,
and have 2 and 7 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)
# folder backup
# git local commit
# git pull remote
# merge conflict
# git local commit
# git push

gitk
git status
git pull origin master
git commit -m "tmp"
git commit -am "tmp"
git pull origin master
git add .
git status
git commit -m "tmp2"
git pull origin master
atom .
git status
git add .
git commit -m "tmp3"
git status
git push origin master
gitk
branch merged

파일 하나 롤백

git checkout b1fea8b -- server.js

Commit 롤백

git revert HEAD
git revert hashhash

파일 하나 unstage

git checkout -- server.js

git diff

git diff HEAD^ HEAD
git diff develop master path/to/file
git diff @~..@
git show
git diff commit_id HEAD
git difftool HEAD^ HEAD

git log

git log --pretty=format:"%h - %an, %ar : %s" --author kenu.heo --since=2.days
git log --name-only -1 f002a898

로컬 브랜치 정리

git remote prune origin
git fetch -p

errors

fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
git config http.postBuffer 724288000

or

git config --global core.compression 0
git clone --depth 1 https://github.com/kenu/okdevtv
cd okdevtv
git fetch --unshallow
git pull --all

git pull push timeout

# ~/.ssh/config
Host github.com
    Hostname ssh.github.com
    Port 443
What Else?
inflearn react api server -50% 할인쿠폰: 15108-f2af1e086101 buy me a coffee