Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 1.1 KB

File metadata and controls

31 lines (19 loc) · 1.1 KB

Tutorial - Part 11: Cleaning up with slide-out

When a feature branch is merged into its parent, it usually appears in git machete status with a gray edge. This means the branch is no longer needed in the layout.

The slide-out command

To remove a merged branch from the layout and connect its children directly to its parent, use:

git machete slide-out [<branch1> [<branch2>...]]

What it does

  1. Removes the current branch/given branch(es) from the .git/machete file.
  2. If the branch had any children, they are now attached to the parent of the removed branch.
  3. By default, rebases these children onto their new parent (skip with --no-rebase).
  4. Optionally deletes the slid-out branch locally from git with git branch -D (use --delete).

Example

Before git machete slide-out:

After git machete slide-out hotfix/add-trigger:

< Previous: Fast-forwarding with advance | Next: GitHub/GitLab integration >