git switch [-c] branch_name
git checkout [-b] branch_name
둘다 깃 branch를 이동할때 쓰이며, switch는 -c 옵션을, checkout은 -b 옵션을 통해서 branch를 생성하면서 이동이 가능
git branch --all
: remote의 모든 branch 확인git branch --merged
: merged된 상태의 브랜치만 확인git branch --no-merged
: merged되지 않은 상태의 브래치만 확인git branch -d branch_name
: local의 branch 제거git push origin --delete branch_name
: local에서 제거한 branch를 remote에 반영git branch --move current_name new_name
: branch 이름 변경git push --set-upstream origin new_branch_name
: remote의 branch이름 변경 반영git log master..branch_name
: master branch와 원하는 branch사이의 log 확인git blame
git bisect [good|bad|reset]
git reset --hard HEAD
: local에서 작업한 내용 초기화local에서 작업을 할때, 스스로 너무 지저분하게 작업하고 있는 것에 대해 반성을 한다. git의 branch기능을 이용해서 기능 단위별로 잘 나누고, 필요에 따라서는 commit도 잘게 나눌 필요가 있다고 생각이 들었다. 특정 기능을 구현하는 중에 막히게 되면, 따른 기능을 구현하려고 하는 경향이 있는데, 하나의 branch에서 작업하는 습관을 고치려고 노력해봐야 겠다.😩
또, lint 등의 프로젝트 foundation?을 잡아두고 협업을 하고 있는 것은 처음인데, 팀원들과 어느정도 형태는 비슷해져서 좋은데 아직 내가 너무 익숙하지 못해서 많이 벅차다.😭😭