-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
git fixup and autosquash #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This looks like |
But --amend only works for the last commit. This is for any older commit in your history. Like fixing a typo 4 commits ago. |
Good point, I read "previous commit" as "parent commit". |
It could probably written more clear. I also usually prefer to do this task with a manual "edit" in the interactive rebase. Usually because I want to test if stuff works at that point after the change. And it is much more transparent than using "magic fixups" :) |
@tomaszzielinski I added some explanation to "previous" |
@oderwat Yes, I always use simply |
@@ -637,6 +638,15 @@ Will give you a list of branches that have not been merged into your current bra | |||
|
|||
[*Read more about the Git `branch` command.*](http://git-scm.com/docs/git-branch) | |||
|
|||
### Fixup and Autosquash | |||
If there is something wrong with a previous (can be one or more from HEAD) commit, for example `abcde`. After make changes, run the following command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to "If there is something wrong with a previous commit (can be one or more from HEAD
), for example abcde
, run the following command after you've amended the problem:" and I will merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rafalchmiel updated.
tells how to use
git commit --fixup=
andgit rebase -i --autosquash
to fixup commits