git branch
git branch --all
git switch BRANCHNAME
git switch -C BRANCHNAME2
git checkout HASHCODE(hashcode)
git checkout master(branch name)
git checkout -b BRANCHNAME(create and move)
git branch -v
git branch --merged
git branch --no-merged(not merged)
git branch -d BRANCHNAME
git branch --move name newName
git push --set-upstream origin newName
git log master..test
git hist master..test
git diff master..test
fast-forward
master 브랜치에서 branch 생성 이후 master branch 변동사항이 없다면 merge를 할 때 master branch 를 기존 branch로 옮기고 branch 삭제 하면 깔끔하게 fast-forward
fast-forward 하기싫을때(history 남기고 싶을때), 브랜치는 삭제되지만 기록에는 남아있음
git merge --no-ff BRANCHNAME
git branch -d BRANCHNAME
git merge branchName
*conflict 해결 후 진행(파일에서 수정 후 수정파일 add
git merge --continue
git merge --abort
git config --global mergetool.keepBackup false
git checkout branchA
git rebase master
git checkout master
git merge branchB
git branch -d branchA
git branch -d brachB
rebase --onto master branchA branchB
git checkout master
git merge branchB
*cherry pick(git master branch에 원하는 commit 가져오기)
git cherry-pick HASHCODE