-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
git-worktree.md: add page #1232
Conversation
|
||
- Create a new folder with the specified branch checked out into it: | ||
|
||
`git worktree add {{path}} {{branch}}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be extra clear, {{path/to/folder}}
would make the command match its description even better.
|
||
`git worktree add {{path}} {{branch}}` | ||
|
||
- List all the working directories attached to this repo: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather use "repository", as we don't gain much by abbreviating here.
Nice one @becomesaflame :) Looks good to me, but please take a look at the inline comments. |
Good suggestions. I've updated it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave some minor comments.
Also, what do you think of the prune
option ? Do you think its commonly used enough to be added ?
|
||
- Create a new folder with the specified branch checked out into it: | ||
|
||
`git worktree add {{path/to/folder}} {{branch}}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the inconsistency of options order in your 1st and 3rd examples.
First one has add {{folder}} {{branch}}
Third has add -b {{branch}} {{folder}}
Also, please reorder the examples to have the add
commands first and then the list
command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to have them grouped by type of command, or listed in order of most commonly used to least commonly used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding prune option is a good idea. What are your thoughts on:
- Remove a worktree:
`rm -rf {path/to/folder}} && git worktree prune`
vs
- Remove a worktree (after deleting worktree folder):
`git worktree prune`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to have them grouped by type of command, or listed in order of most commonly used to least commonly used?
The options should be ordered by the workflow. Usually we cite the most simple ones first, then slowly add complexity, building up on previous examples. In this case, we should put add
first, then list
and prune
at last.
What are your thoughts on:
I like the 2nd one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, we should put
add
first, thenlist
andprune
at last.
I think he was asking whether add -b
should be grouped with plain add
, or moved down for being a less common example. I think this call is often subjective so there isn't a single answer, but in this case I'd say it makes more sense for both add
examples to be together.
Not sure what's the problem with the CLA status not being reported. Have you signed it, @becomesaflame? |
Yes, and the check was showing up before as complete. I'm not sure what's going on with it. |
Ok then, @waldyrious, I don't see a problem with force merging it. |
No description provided.