1. 최근 10개 commit들 불러오기 (git-rebase-todo라는 text 파일이 열림)

git rebase -i HEAD~10

git rebase -i 에 대한 설명

-i, --interactive     let the user edit the list of commits to rebase

 

2. git-rebase-todo에서 PR 화면에 안 보이게 하고싶은 commit들 fixup 처리

fixup에 대한 설명

# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup [-C | -c] <commit> = like "squash" but keep only the previous
#                    commit's log message, unless -C is used, in which case
#                    keep only this commit's message; -c is same as -C but
#                    opens the editor
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# .       create a merge commit using the original merge commit's
# .       message (or the oneline, if no original merge commit was
# .       specified); use -c <commit> to reword the commit message

 

3. git push --force로 다듬은 commit들로 push하면 PR이 다듬어짐

git push origin local:remote --force

 

+ Recent posts