Skip to content
Go back

Git rebase -i 交互式变基

Published:  at  08:12 AM

Git Rebase -i12

The git rebase -i command allows you to interactively rebase your commits. This means you can edit, reorder, squash, or drop commits before applying them to another branch.

Example

git checkout feature-branch

git rebase -i HEAD~3

This command opens an editor with the last three commits listed. You can then choose actions like pick, reword, edit, squash, or drop for each commit.

Actions

Considerations

Use git rebase -i to refine your commit history before merging or pushing changes to a shared repository.


Suggest Changes

Previous Post
GitFlow 插件入门
Next Post
Netty 常用的类