mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-28 17:41:14 +00:00
docs branches.md
: insert definitions for related terms
This commit is contained in:
parent
5eb55b035e
commit
69bc1f2b0f
2 changed files with 29 additions and 0 deletions
|
@ -51,6 +51,27 @@ some remote.
|
||||||
If you want to know the internals of branch tracking, consult the
|
If you want to know the internals of branch tracking, consult the
|
||||||
[Design Doc][design].
|
[Design Doc][design].
|
||||||
|
|
||||||
|
### Terminology summary
|
||||||
|
|
||||||
|
- A **remote branch** is a branch ref on the remote. `jj` can find out its
|
||||||
|
actual state only when it's actively communicating with the remote. However,
|
||||||
|
`jj` does store the last-seen position of the remote branch; this is the
|
||||||
|
commit `jj show <branch name>@<remote name>` would show. This notion is
|
||||||
|
completely analogous to Git's "remote-tracking branches".
|
||||||
|
- A **tracked (remote) branch** is defined above. You can make a remote branch
|
||||||
|
tracked with the [`jj branch track` command](#manually-tracking-a-branch), for
|
||||||
|
example.
|
||||||
|
- A **tracking (local) branch** is the local branch that `jj` tries to keep in
|
||||||
|
sync with the tracked remote branch. For example, after `jj branch track
|
||||||
|
mybranch@origin`, there will be a local branch `mybranch` that's tracking the
|
||||||
|
remote `mybranch@origin` branch. A local branch can track a branch of the same
|
||||||
|
name on 0 or more remotes.
|
||||||
|
|
||||||
|
The notion of tracked branches serves a similar function to the Git notion of an
|
||||||
|
"upstream branch". Unlike Git, a single local branch can be tracking remote
|
||||||
|
branches on multiple remotes, and the names of the local and remote branches
|
||||||
|
must match.
|
||||||
|
|
||||||
### Manually tracking a branch
|
### Manually tracking a branch
|
||||||
|
|
||||||
To track a branch permanently use `jj branch track <branch name>@<remote name>`.
|
To track a branch permanently use `jj branch track <branch name>@<remote name>`.
|
||||||
|
|
|
@ -173,6 +173,14 @@ A tree object represents a snapshot of a directory in the repository. Tree
|
||||||
objects are defined recursively; each tree object only has the files and
|
objects are defined recursively; each tree object only has the files and
|
||||||
directories contained directly in the directory it represents.
|
directories contained directly in the directory it represents.
|
||||||
|
|
||||||
|
## Tracked branches and tracking branches
|
||||||
|
|
||||||
|
A remote branch can be made "tracked" with the `jj branch track` command. This
|
||||||
|
results in a "tracking" local branch that tracks the remote branch.
|
||||||
|
|
||||||
|
See [the branches documentation](branches.md#terminology-summary) for a more
|
||||||
|
detailed definition of these terms.
|
||||||
|
|
||||||
## Visible commits
|
## Visible commits
|
||||||
|
|
||||||
Visible commits are the commits you see in `jj log -r 'all()'`. They are the
|
Visible commits are the commits you see in `jj log -r 'all()'`. They are the
|
||||||
|
|
Loading…
Reference in a new issue