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

git-worktree.md: add page #1232

Merged
merged 5 commits into from
Jan 9, 2017
Merged

Conversation

becomesaflame
Copy link
Contributor

No description provided.


- Create a new folder with the specified branch checked out into it:

`git worktree add {{path}} {{branch}}`
Copy link
Member

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:
Copy link
Member

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.

@waldyrious
Copy link
Member

Nice one @becomesaflame :) Looks good to me, but please take a look at the inline comments.

@becomesaflame
Copy link
Contributor Author

Good suggestions. I've updated it

@agnivade agnivade changed the title Create git-worktree.md git-worktree.md: add page Jan 6, 2017
@agnivade agnivade added the new command Issues requesting creation of a new page. label Jan 6, 2017
Copy link
Member

@agnivade agnivade left a 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}}`
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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`

Copy link
Member

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.

Copy link
Member

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, then list and prune 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.

@waldyrious
Copy link
Member

Not sure what's the problem with the CLA status not being reported. Have you signed it, @becomesaflame?

@becomesaflame
Copy link
Contributor Author

Yes, and the check was showing up before as complete. I'm not sure what's going on with it.

@agnivade
Copy link
Member

agnivade commented Jan 9, 2017

Ok then, @waldyrious, I don't see a problem with force merging it.

@waldyrious waldyrious merged commit 6860a40 into tldr-pages:master Jan 9, 2017
@becomesaflame becomesaflame deleted the git-worktree branch January 9, 2017 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new command Issues requesting creation of a new page.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants