-
Notifications
You must be signed in to change notification settings - Fork 1.2k
create-branch allows for preference for remote option
#761
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
Merged
spacewander
merged 2 commits into
tj:master
from
btmurrell:preference-for-create-branch
Jun 22, 2019
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,33 +7,62 @@ git-create-branch(1) -- Create branches | |
|
|
||
| ## DESCRIPTION | ||
|
|
||
| Creates local branch named <branchname> and optionally sets up a remote tracking branch. | ||
| Creates local branch named <branchname> and optionally sets up a remote tracking branch. | ||
|
|
||
| ## OPTIONS | ||
|
|
||
| <-r|--remote [remote_name]> | ||
| <-r|--remote [remote_name]> | ||
|
|
||
| Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default. | ||
| Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default. | ||
|
|
||
| <branchname> | ||
| <branchname> | ||
|
|
||
| The name of the branch to create. | ||
| The name of the branch to create. | ||
|
|
||
| ## PREFERENCES | ||
|
|
||
| You may save your default preference for the `remote` option above by using `git config` with the key `git-extras.create-branch.remote` whose value will be the default remote when `[-r|--remote]` is not specified. | ||
|
|
||
| $ git config git-extras.create-branch.remote lucinda | ||
|
|
||
| The command line option `-r|--remote` will override this preference. | ||
|
|
||
| ## EXAMPLES | ||
|
|
||
| With no remote preference set: | ||
|
|
||
| # creates local branch 'integration' | ||
| $ git create-branch integration | ||
|
|
||
| # creates local & remote branch 'integration' (on default 'origin') | ||
| $ git create-branch -r integration | ||
|
|
||
| # creates local & remote branch 'integration' on 'upstream' | ||
| $ git create-branch -r upstream integration | ||
|
|
||
| With `git-extras.create-branch.remote` preference set to 'lucinda': | ||
|
|
||
| # creates local & remote branch 'integration' (on preference 'lucinda') | ||
| $ git create-branch integration | ||
|
|
||
| # overriding preference, using default `-r` of 'origin' | ||
| # creates local & remote branch 'integration' on default 'origin' | ||
| $ git create-branch -r integration | ||
|
|
||
| # overriding preference, using specified `-r` of 'upstream' | ||
| # creates local & remote branch 'integration' on 'upstream' | ||
| $ git create-branch -r upstream integration | ||
|
|
||
| ## NOTES | ||
|
|
||
| As of 4.4.0, the default behavior has changed. `git-create-branch` will no longer automatically setup a remote tracking branch unless the `-r|-remote` option is specified. | ||
| * As of 4.4.0, the default behavior has changed. `git-create-branch` will no longer automatically setup a remote tracking branch unless the `-r|-remote` option is specified. See additional note on preference feature in 4.8.0-dev below. | ||
|
|
||
| * As of 4.8.0-dev, the `remote` option can be set via `git config` preference as described in [Preferences](#PREFERENCES) section. | ||
|
|
||
| ## AUTHOR | ||
|
|
||
| Written by Jonhnny Weslley <<[email protected]>> | ||
| Modified by Mark Pitman <<[email protected]>> | ||
| Written by Jonhnny Weslley <<[email protected]>> | ||
| Modified by Mark Pitman <<[email protected]>>, Brian Murrell <<[email protected]>>. | ||
|
|
||
| ## REPORTING BUGS | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.