git config --list
git reset --soft HEAD^
git revert commitHashCode
-> revert commit message 작성
git reflog
git reset --hard HEAD@{1}
git branch -d <branchName>
git push origin --delete <branchName>
$ git reset --hard ORIG_HEAD
-> 머지 이력이 남지 않는다
다른 브런치에서 작업한 n가지 커밋을 묶어 merge 한다
단점: n가지 커밋에 대한 잔디 안심어짐
명령어:
git merge --squash <branch_name>
명령어 실행 이후 변화된 내용이 커밋 없이 머지된 브런치에 적용되며
이 시점에서 커밋 명령어를 사용하면
병합할 n가지 커밋의 해시와 메시지들을
커밋 메시지로 자동으로 생성해준다
git restore .
->
fast-forward merge 가 작동하기 때문
merge 브런치로 추가 커밋 내용이 없으면 메시지 에디터가 작동하지 않음
해결방법
git merge --no-ff <workedBranchName>
git push -all origin