Skip to content

Commit

Permalink
docs: Add a short section on branch movement.
Browse files Browse the repository at this point in the history
This is something which should've been written down long ago. This is a follow-up upon 
another question from Julia Evans in Discord. 

Thank you again for asking such good questions.
  • Loading branch information
PhilipMetzger committed Feb 28, 2024
1 parent 1d4860c commit 7efbc98
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/branches.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ Branches that already existed before the `jj git fetch` are not affected. This
is similar to Mercurial, which fetches all its bookmarks (equivalent to Git
branches) by default.

## Branch movement

Currently Jujutsu only moves branches by itself when these conditions are met:

* When a commit has been rewritten (so when you `jj split` a change) the
working-copy will move along with it.
* When a commit has been abandoned, all associated branches will with the
working-copy to its parent(s).

You could describe the movement as following along the change-id of the
working-copy commit, even if it isn't entirely accurate.

## Conflicts

Expand Down

0 comments on commit 7efbc98

Please sign in to comment.