-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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-switch: add page #3246
git-switch: add page #3246
Conversation
The build for this PR has failed with the following error(s):
Please fix the error(s) and push again. |
pages/common/git-switch.md
Outdated
|
||
- Create a new branch based on an existing commit: | ||
|
||
`git switch --create {{branch_name}} {{start_point}}` |
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.
Perhaps we should change "start_point" to "commit" to match with the other git pages.
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.
Agreed — it also better reflects the description.
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.
Changed. I only used start_point
because that's the language that the documentation page uses.
pages/common/git-switch.md
Outdated
|
||
`git switch --create {{branch_name}} {{start_point}}` | ||
|
||
- Also update all submodules: |
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.
This sounds somewhat informal. I am wondering if it sounds any better if we drop "Also" ?
pages/common/git-switch.md
Outdated
|
||
- Also update all submodules: | ||
|
||
`git switch --recurse-submodules` |
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'm a little confused by this; doesn't this need the target branch name to switch to?
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.
It does! I forgot to add that :P
pages/common/git-switch.md
Outdated
|
||
`git switch --recurse-submodules` | ||
|
||
- Automatically merge the old branch and any uncommitted changes into the new 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.
I think using "current" instead of "old" would be more explicit and clear.
OMG finally! Thanks, @sbrl, this made my day :) |
You're welcome, @waldyrious! Ubuntu 19.04 doesn't have git v2.23 yet though, so this is all done by analysing the documentation page. |
@schneiderl when other maintainers have commented on a PR suggesting changes, it's preferable to allow them to react (i.e. explicitly approve the PR) after the changes are made, or at least wait a bit more before merging. :) I would have added a minor comment upon a second reading of the page. ;) |
|
||
`git switch --create {{branch_name}}` | ||
|
||
- Create a new branch based on an existing commit: |
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.
"...and switch to it". Otherwise this is the same as git branch {{branch_name}} {{commit}}
.
|
||
`git switch --create {{branch_name}} {{commit}}` | ||
|
||
- Update all submodules to match the target 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.
"Switch to a branch and update..."
|
||
`git switch --recurse-submodules {{branch_name}}` | ||
|
||
- Automatically merge the current branch and any uncommitted changes into the new 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.
The branch is "new" only in the sense that we're switching into it, but that conflicts with the other use of "new" in this page. How about this:
Switch to a branch and automatically merge the current branch and any uncommitted changes into 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.
Sure!
Opened #3248 |
@waldyrious Oh I'm sorry I haven't seen that. Somehow thought everything was fixed. Sorry for the inconvenience. |
No problem @schneiderl :) Things like this are easy to slip through unnoticed. |
Part 1 of several from GitHub's blog post about git v2.23!
Original source: https://github.blog/2019-08-16-highlights-from-git-2-23/?utm_campaign=1565911976&utm_medium=social&utm_source=twitter&utm_content=1565911976
common/
,linux/
, etc.)