平台與維運 2020 年 10 月 30 日

[Git] faster rebase by using git commit –fixup

1.Enable --autosquash in globa…

1.Enable --autosquash in global settings

git config --global rebase.autosquash true

2.When you want to create a fix to former commit

git commit --fixup=<commit>

Then a commit message starts with fixup! will be created
3.Run git rebase, then it will auto squash the fixup

git rebase -i HEAD~2
End of article
0
Would love your thoughts, please comment.x
()
x