Skip to content
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

docs: Add a short section on branch movement. #3162

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/branches.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,19 @@ 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 automatically moves local branches when these conditions are
met:

* When a commit has been rewritten (e.g, when you rebase) branches and the
working-copy will move along with it.
PhilipMetzger marked this conversation as resolved.
Show resolved Hide resolved
* When a commit has been abandoned, all associated branches will be moved
to its parent(s). If a working copy was pointing to the abandoned commit,
then a new working-copy commit will be created on top of the parent(s).

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

## Conflicts

Expand Down