git | 이미 origin 에 push 한 커밋 메시지 수정

2022. 9. 27. 15:00Post

출처: https://pung77.tistory.com/26 [몽키의 IT개발 노트:티스토리]


1. git commit --amend

2. 내용 수정 후 저장

3. git push -f 또는 git push <remote> <branch> --force

 

force-pushing은 현재 local 내용을 remote에 overwite하게된다. 

원격의 최근 내용이 나의 local에 없다면 내용이 유실