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 branch tracking to branches.md. #2625

Merged
merged 1 commit into from
Jan 2, 2024
Merged

Conversation

PhilipMetzger
Copy link
Contributor

@PhilipMetzger PhilipMetzger commented Nov 23, 2023

This tries to explain Jujutsu's branch tracking for a newcomer.
It is based on it's design doc in docs/design/tracking-branches.md.

I'd like to have some opinions on it, before finishing it.
cc @yuja, @ilyagr

Checklist

If applicable:

  • I have updated the documentation (README.md, docs/, demos/)

Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling on this! I've added some inline comments. I think it's better to update branches.md instead of adding new separate page.

docs/branch_tracking.md Outdated Show resolved Hide resolved
docs/branch_tracking.md Outdated Show resolved Hide resolved
docs/branch_tracking.md Outdated Show resolved Hide resolved
docs/branch_tracking.md Outdated Show resolved Hide resolved
docs/branch_tracking.md Outdated Show resolved Hide resolved
@PhilipMetzger
Copy link
Contributor Author

I think it's better to update branches.md instead of adding new separate page.

Yes, I only noticed branches.md after I started writing. At least for me it's simpler to start from a blank page. I'll move it to the remotes section.

@PhilipMetzger PhilipMetzger added the documentation Improvements or additions to documentation label Dec 5, 2023
@PhilipMetzger PhilipMetzger force-pushed the push-tovwwwnmonyp branch 2 times, most recently from 273cabe to 69a81a8 Compare December 5, 2023 19:21
@PhilipMetzger PhilipMetzger changed the title docs: Add a user-friendly branch tracking doc. docs: Add branch tracking to branches.md. Dec 5, 2023
@PhilipMetzger
Copy link
Contributor Author

I'm marking this PR as ready for review for any further refinements.

@PhilipMetzger PhilipMetzger marked this pull request as ready for review December 5, 2023 19:25
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks.

nit: the commit message includes WIP: Not done yet.

docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
@PhilipMetzger PhilipMetzger force-pushed the push-tovwwwnmonyp branch 2 times, most recently from 9134bff to 8ccb35f Compare December 6, 2023 18:50
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ilyagr
Copy link
Contributor

ilyagr commented Dec 7, 2023

I glanced at this, it looks pretty good to me too. I still think we should mention auto-local-branches, but it could be a separate PR. Feel free to either wait a bit for me to think about it more carefully, or feel free to merge this and then I or you can make another PR at some point.

@PhilipMetzger
Copy link
Contributor Author

I glanced at this, it looks pretty good to me too

Thanks.

I still think we should mention auto-local-branches, but it could be a separate PR. Feel free to either wait a bit for me to think about it more carefully, or feel free to merge this and then I or you can make another PR at some point.

I don't mind landing this in the new year. So take your time.

docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
ilyagr added a commit to ilyagr/jj that referenced this pull request Dec 12, 2023
… help`

This tries to clarify the fact that the branches must be remote and the syntax
for specifying them as globs.

Cc @yuja, jj-vcs#2625 (comment)

Here is the result (excerpt):

```
$ jj branch track --help
Start tracking given remote branches

A tracking remote branch will be imported as a local branch of the same name. Changes to it
will propagate to the existing local branch on future pulls.

Usage: jj branch track [OPTIONS] <BRANCH@REMOTE>...

Arguments:
  <BRANCH@REMOTE>...
          Remote branches to track

          By default, the specified name matches exactly. Use `glob:` prefix to select
          branches by wildcard pattern. For details, see
          https://github.com/martinvonz/jj/blob/main/docs/revsets.md#string-patterns.

          Examples: branch@remote, glob:main@*, glob:jjfan-*@upstream
```
ilyagr added a commit to ilyagr/jj that referenced this pull request Dec 12, 2023
… help`

This tries to clarify the fact that the branches must be remote and the syntax
for specifying them as globs.

Cc @yuja, jj-vcs#2625 (comment)

Here is the result (excerpt):

```
$ jj branch track --help
Start tracking given remote branches

A tracking remote branch will be imported as a local branch of the same name. Changes to it
will propagate to the existing local branch on future pulls.

Usage: jj branch track [OPTIONS] <BRANCH@REMOTE>...

Arguments:
  <BRANCH@REMOTE>...
          Remote branches to track

          By default, the specified name matches exactly. Use `glob:` prefix to select
          branches by wildcard pattern. For details, see
          https://github.com/martinvonz/jj/blob/main/docs/revsets.md#string-patterns.

          Examples: branch@remote, glob:main@*, glob:jjfan-*@upstream
```
@PhilipMetzger
Copy link
Contributor Author

@ilyagr PTAL, I took a stab at a "What does git.auto-local-branches actually do" section.

ilyagr added a commit that referenced this pull request Dec 12, 2023
… help`

This tries to clarify the fact that the branches must be remote and the syntax
for specifying them as globs.

Cc @yuja, #2625 (comment)

Here is the result (excerpt):

```
$ jj branch track --help
Start tracking given remote branches

A tracking remote branch will be imported as a local branch of the same name. Changes to it
will propagate to the existing local branch on future pulls.

Usage: jj branch track [OPTIONS] <BRANCH@REMOTE>...

Arguments:
  <BRANCH@REMOTE>...
          Remote branches to track

          By default, the specified name matches exactly. Use `glob:` prefix to select
          branches by wildcard pattern. For details, see
          https://github.com/martinvonz/jj/blob/main/docs/revsets.md#string-patterns.

          Examples: branch@remote, glob:main@*, glob:jjfan-*@upstream
```
yuja added a commit to yuja/jj that referenced this pull request Dec 16, 2023
As far as I can see in the chat, there's no objection to changing the default,
and git.auto-local-branch = false is generally preferred.

docs/branches.md isn't updated as it would otherwise conflict with jj-vcs#2625. I
think the "Remotes" section will need a non-trivial rewrite.

jj-vcs#1136, jj-vcs#1862
yuja added a commit to yuja/jj that referenced this pull request Dec 16, 2023
As far as I can see in the chat, there's no objection to changing the default,
and git.auto-local-branch = false is generally preferred.

docs/branches.md isn't updated as it would otherwise conflict with jj-vcs#2625. I
think the "Remotes" section will need a non-trivial rewrite.

jj-vcs#1136, jj-vcs#1862
yuja added a commit that referenced this pull request Dec 16, 2023
As far as I can see in the chat, there's no objection to changing the default,
and git.auto-local-branch = false is generally preferred.

docs/branches.md isn't updated as it would otherwise conflict with #2625. I
think the "Remotes" section will need a non-trivial rewrite.

#1136, #1862
@PhilipMetzger
Copy link
Contributor Author

I'd like to land this in the upcoming weeks, ideally before we have a new release. If you have nits or improvements for the new section feel free to add them now.

Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
docs/branches.md Outdated Show resolved Hide resolved
@ilyagr
Copy link
Contributor

ilyagr commented Jan 2, 2024

Thanks for the reminder, Philip! I added a few suggestions as well; feel free to adjust them further.

docs/branches.md Outdated Show resolved Hide resolved
This tries to explain Jujutsu's branch tracking for a newcomer. 
It is based on it's design doc in `docs/design/tracking-branches.md`.
@PhilipMetzger PhilipMetzger enabled auto-merge (rebase) January 2, 2024 21:08
@PhilipMetzger PhilipMetzger merged commit a6e1bc8 into main Jan 2, 2024
15 checks passed
@PhilipMetzger PhilipMetzger deleted the push-tovwwwnmonyp branch January 2, 2024 21:14
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I also realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I also realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I also realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I also realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I also realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I also realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I also realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I also realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 4, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 24, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.

## The callout

Unfortunately, GitHub and MkDocs use different syntax for admonitions.

The callout looks like this in MkDocs:
https://github.com/martinvonz/jj/assets/4123047/45d79e7a-35db-492e-a227-004b7e3383c1

Use `poetry run -- mkdocs serve` to double-check.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 24, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.

## The callout

Unfortunately, GitHub and MkDocs use different syntax for admonitions.

The callout looks like this in MkDocs:
https://github.com/martinvonz/jj/assets/4123047/45d79e7a-35db-492e-a227-004b7e3383c1

Use `poetry run -- mkdocs serve` to double-check.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 24, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.

## The callout

Unfortunately, GitHub and MkDocs use different syntax for admonitions.

The callout looks like this in MkDocs:
https://github.com/martinvonz/jj/assets/4123047/45d79e7a-35db-492e-a227-004b7e3383c1

Use `poetry run -- mkdocs serve` to double-check.
ilyagr added a commit to ilyagr/jj that referenced this pull request Jan 24, 2024
This follows up on jj-vcs#2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.

## The callout

Unfortunately, GitHub and MkDocs use different syntax for admonitions.

The callout looks like this in MkDocs:
https://github.com/martinvonz/jj/assets/4123047/45d79e7a-35db-492e-a227-004b7e3383c1

Use `poetry run -- mkdocs serve` to double-check.
ilyagr added a commit that referenced this pull request Jan 25, 2024
This follows up on #2625 and updates all sections of `branches.md` to represent
the new default of `git.auto-local-branch=false`.

I realized that the paragraph we discussed for so long with @PhilipMetzger
actually repeats information that was already present a bit earlier in the file.
So, I removed most of it and moved the rest. Sorry I didn't notice this earler.

## The callout

Unfortunately, GitHub and MkDocs use different syntax for admonitions.

The callout looks like this in MkDocs:
https://github.com/martinvonz/jj/assets/4123047/45d79e7a-35db-492e-a227-004b7e3383c1

Use `poetry run -- mkdocs serve` to double-check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants