mirror of
https://github.com/tj/git-extras.git
synced 2026-09-14 17:36:25 -04:00
Merge pull request #664 from mapitman/master
Specify upstream for git bug/chore/feature/refactor and git create-branch won't set origin as upstream by default
This commit is contained in:
commit
9e2a625b29
23
Commands.md
23
Commands.md
|
|
@ -100,6 +100,13 @@ Create/Merge the given feature, refactor, bug or chore branch `name`:
|
|||
$ git feature dependencies
|
||||
```
|
||||
|
||||
To Setup a remote tracking branch:
|
||||
|
||||
```bash
|
||||
$ git feature dependencies -r upstream
|
||||
```
|
||||
_Note_: If no remote name is passed with the `-r` option, it will push to _origin_.
|
||||
|
||||
Afterwards, the same command will check it out:
|
||||
|
||||
```bash
|
||||
|
|
@ -114,6 +121,8 @@ $ git checkout master
|
|||
$ git feature finish dependencies
|
||||
```
|
||||
|
||||
_Note_: If a remote is setup to track the branch, it will be deleted.
|
||||
|
||||
All of this works with `feature`, `bug`, `chore` or `refactor`.
|
||||
|
||||
## git contrib
|
||||
|
|
@ -708,12 +717,24 @@ $ git info --no-config
|
|||
|
||||
## git create-branch
|
||||
|
||||
Create local and remote branch `name`:
|
||||
Create local branch `name`:
|
||||
|
||||
```bash
|
||||
$ git create-branch development
|
||||
```
|
||||
|
||||
Create local branch `name` and setup a remote tracking branch in `origin`:
|
||||
|
||||
```bash
|
||||
$ git create-branch -r development
|
||||
```
|
||||
|
||||
Create local branch `name` and setup a remote tracking branch in `upstream`:
|
||||
|
||||
```bash
|
||||
$ git create-branch -r upstream development
|
||||
```
|
||||
|
||||
## git delete-branch
|
||||
|
||||
Delete local and remote branch `name`:
|
||||
|
|
|
|||
14
bin/git-bug
14
bin/git-bug
|
|
@ -1,14 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if test "$1" = "finish"; then
|
||||
test -z $2 && echo "bug <name> required." 1>&2 && exit 1
|
||||
branch=bug/$2
|
||||
git merge --no-ff $branch && git delete-branch $branch
|
||||
else
|
||||
test -z $1 && echo "bug <name> required." 1>&2 && exit 1
|
||||
if test -n "$2"; then
|
||||
echo "too many arguments; if not finishing a bug, only <name> of new bug is expected" && exit 1
|
||||
fi
|
||||
branch=bug/$1
|
||||
git checkout -b $branch
|
||||
fi
|
||||
ALIAS=bug
|
||||
git feature -a $ALIAS "$@"
|
||||
|
|
|
|||
|
|
@ -1,14 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if test "$1" = "finish"; then
|
||||
test -z $2 && echo "chore <name> required." 1>&2 && exit 1
|
||||
branch=chore/$2
|
||||
git merge --no-ff $branch && git delete-branch $branch
|
||||
else
|
||||
test -z $1 && echo "chore <name> required." 1>&2 && exit 1
|
||||
if test -n "$2"; then
|
||||
echo "too many arguments; if not finishing a chore, only <name> of new chore is expected" && exit 1
|
||||
fi
|
||||
branch=chore/$1
|
||||
git checkout -b $branch
|
||||
fi
|
||||
ALIAS=chore
|
||||
git feature -a $ALIAS "$@"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
branch=$1
|
||||
test -z $branch && echo "branch required." 1>&2 && exit 1
|
||||
while test $# != 0
|
||||
do
|
||||
case $1 in
|
||||
-r|--remote)
|
||||
if [[ -n $2 ]]
|
||||
then
|
||||
REMOTE=$2
|
||||
shift
|
||||
else
|
||||
REMOTE=origin
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
BRANCH=$1
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
git push origin HEAD:refs/heads/$branch
|
||||
git fetch origin
|
||||
git checkout --track -b $branch origin/$branch
|
||||
if [[ -z $BRANCH ]] && [[ -n $REMOTE ]]
|
||||
then
|
||||
BRANCH=$REMOTE
|
||||
REMOTE=origin
|
||||
fi
|
||||
|
||||
test -z $BRANCH && echo "branch required." 1>&2 && exit 1
|
||||
if [[ -n $REMOTE ]]
|
||||
then
|
||||
git ls-remote --exit-code $REMOTE &>/dev/null
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
git push $REMOTE HEAD:refs/heads/$BRANCH
|
||||
git fetch $REMOTE
|
||||
git checkout --track -b $BRANCH $REMOTE/$BRANCH
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
git checkout -b $BRANCH
|
||||
|
|
|
|||
|
|
@ -14,6 +14,15 @@ do
|
|||
argv+=($1) # treat tail '-a' as <name>
|
||||
fi
|
||||
;;
|
||||
-r|--remote )
|
||||
if [[ -n $2 ]]
|
||||
then
|
||||
remote=$2
|
||||
shift
|
||||
else
|
||||
remote="origin"
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
argv+=($1)
|
||||
;;
|
||||
|
|
@ -27,15 +36,20 @@ concatargs(){
|
|||
}
|
||||
|
||||
if test "${argv[0]}" = "finish"; then
|
||||
test -z "${argv[1]}" && echo "$branch_prefix" "<name> required." 1>&2 && exit 1
|
||||
branch="$branch_prefix"/"${argv[1]}"
|
||||
git merge --no-ff "$branch" && git delete-branch "$branch"
|
||||
test -z "${argv[1]}" && echo "$branch_prefix" "<name> required." 1>&2 && exit 1
|
||||
branch="$branch_prefix"/"${argv[1]}"
|
||||
git merge --no-ff "$branch" && git delete-branch "$branch"
|
||||
else
|
||||
test -z "${argv[0]}" && echo "$branch_prefix" "<name> required." 1>&2 && exit 1
|
||||
if test -n "${argv[1]}"; then
|
||||
concatargs "${argv[@]}"
|
||||
else
|
||||
branch="$branch_prefix"/"${argv[0]}"
|
||||
fi
|
||||
git checkout -b $branch
|
||||
test -z "${argv[0]}" && echo "$branch_prefix" "<name> required." 1>&2 && exit 1
|
||||
if test -n "${argv[1]}"; then
|
||||
concatargs "${argv[@]}"
|
||||
else
|
||||
branch="$branch_prefix"/"${argv[0]}"
|
||||
fi
|
||||
if [[ -n $remote ]]
|
||||
then
|
||||
git create-branch -r $remote $branch
|
||||
else
|
||||
git create-branch $branch
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,14 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if test "$1" = "finish"; then
|
||||
test -z $2 && echo "refactor <name> required." 1>&2 && exit 1
|
||||
branch=refactor/$2
|
||||
git merge --no-ff $branch && git delete-branch $branch
|
||||
else
|
||||
test -z $1 && echo "refactor <name> required." 1>&2 && exit 1
|
||||
if test -n "$2"; then
|
||||
echo "too many arguments; if not finishing a refactor, only <name> of new refactoring is expected" && exit 1
|
||||
fi
|
||||
branch=refactor/$1
|
||||
git checkout -b $branch
|
||||
fi
|
||||
ALIAS=refactor
|
||||
git feature -a $ALIAS "$@"
|
||||
|
|
|
|||
|
|
@ -1,24 +1,33 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-BUG" "1" "December 2015" "" ""
|
||||
.TH "GIT\-BUG" "1" "July 2017" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-bug\fR \- Create bug branch
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
\fBgit\-bug\fR [finish] <name>
|
||||
\fBgit\-bug\fR [\-r|\-\-remote [remote_name]] [finish] <name>
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
Create the given bug branch
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
<\-r|\-\-remote [remote_name]>
|
||||
.
|
||||
.P
|
||||
Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\.
|
||||
.
|
||||
.P
|
||||
<finish>
|
||||
.
|
||||
.P
|
||||
Merge and delete the bug branch\.
|
||||
.
|
||||
.P
|
||||
<\-r
|
||||
.
|
||||
.P
|
||||
<name>
|
||||
.
|
||||
.P
|
||||
|
|
@ -34,12 +43,17 @@ $ git commit \-m "Some changes"
|
|||
\.\.\.
|
||||
$ git checkout master
|
||||
$ git bug finish bug\-123456
|
||||
|
||||
$ git bug \-r 12345
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "AUTHOR"
|
||||
Written by Jesús Espino <\fIjespinog@gmail\.com\fR>
|
||||
.
|
||||
.br
|
||||
Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR>
|
||||
.
|
||||
.SH "REPORTING BUGS"
|
||||
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
|
||||
.
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||
|
||||
<p><code>git-bug</code> [finish] <name></p>
|
||||
<p><code>git-bug</code> [-r|--remote [remote_name]] [finish] <name></p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
|
|
@ -84,10 +84,16 @@
|
|||
|
||||
<h2 id="OPTIONS">OPTIONS</h2>
|
||||
|
||||
<p> <-r|--remote [remote_name]></p>
|
||||
|
||||
<p> Setup a remote tracking branch using <code>remote_name</code>. If <code>remote_name</code> is not supplied, use <code>origin</code> by default.</p>
|
||||
|
||||
<p> <finish></p>
|
||||
|
||||
<p> Merge and delete the bug branch.</p>
|
||||
|
||||
<p> <-r</p>
|
||||
|
||||
<p> <name></p>
|
||||
|
||||
<p> The name of the bug branch.</p>
|
||||
|
|
@ -100,11 +106,14 @@ $ git commit -m "Some changes"
|
|||
...
|
||||
$ git checkout master
|
||||
$ git bug finish bug-123456
|
||||
|
||||
$ git bug -r 12345
|
||||
</code></pre>
|
||||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Jesús Espino <<a href="mailto:jespinog@gmail.com" data-bare-link="true">jespinog@gmail.com</a>></p>
|
||||
<p>Written by Jesús Espino <<a href="mailto:jespinog@gmail.com" data-bare-link="true">jespinog@gmail.com</a>><br />
|
||||
Modified by Mark Pitman <<a href="mailto:mark.pitman@gmail.com" data-bare-link="true">mark.pitman@gmail.com</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -117,7 +126,7 @@ $ git bug finish bug-123456
|
|||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>December 2015</li>
|
||||
<li class='tc'>July 2017</li>
|
||||
<li class='tr'>git-bug(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ git-bug(1) -- Create bug branch
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
`git-bug` [finish] <name>
|
||||
`git-bug` [-r|--remote [remote_name]] [finish] <name>
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
@ -11,10 +11,16 @@ git-bug(1) -- Create bug branch
|
|||
|
||||
## OPTIONS
|
||||
|
||||
<-r|--remote [remote_name]>
|
||||
|
||||
Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default.
|
||||
|
||||
<finish>
|
||||
|
||||
Merge and delete the bug branch.
|
||||
|
||||
<-r
|
||||
|
||||
<name>
|
||||
|
||||
The name of the bug branch.
|
||||
|
|
@ -28,9 +34,12 @@ git-bug(1) -- Create bug branch
|
|||
$ git checkout master
|
||||
$ git bug finish bug-123456
|
||||
|
||||
$ git bug -r 12345
|
||||
|
||||
## AUTHOR
|
||||
|
||||
Written by Jesús Espino <<jespinog@gmail.com>>
|
||||
Written by Jesús Espino <<jespinog@gmail.com>>
|
||||
Modified by Mark Pitman <<mark.pitman@gmail.com>>
|
||||
|
||||
## REPORTING BUGS
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,24 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-CHORE" "1" "December 2015" "" ""
|
||||
.TH "GIT\-CHORE" "1" "July 2017" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-chore\fR \- Create chore branch
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
\fBgit\-chore\fR [finish] <name>
|
||||
\fBgit\-chore\fR [\-r|\-\-remote [remote_name]] [finish] <name>
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
Create the given chore branch
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
<\-r|\-\-remote [remote_name]>
|
||||
.
|
||||
.P
|
||||
Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\.
|
||||
.
|
||||
.P
|
||||
<finish>
|
||||
.
|
||||
.P
|
||||
|
|
@ -34,12 +40,17 @@ $ git commit \-m "Some changes"
|
|||
\.\.\.
|
||||
$ git checkout master
|
||||
$ git chore finish chore\-123456
|
||||
|
||||
$ git chore \-r upstream 123456
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "AUTHOR"
|
||||
Written by Chris Hall <\fIchristopher\.k\.hall@gmail\.com\fR> from bug/feature/refactor commands originally written by Jesús Espino <\fIjespinog@gmail\.com\fR>
|
||||
.
|
||||
.br
|
||||
Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR>
|
||||
.
|
||||
.SH "REPORTING BUGS"
|
||||
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
|
||||
.
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||
|
||||
<p><code>git-chore</code> [finish] <name></p>
|
||||
<p><code>git-chore</code> [-r|--remote [remote_name]] [finish] <name></p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
|
|
@ -84,6 +84,10 @@
|
|||
|
||||
<h2 id="OPTIONS">OPTIONS</h2>
|
||||
|
||||
<p> <-r|--remote [remote_name]></p>
|
||||
|
||||
<p> Setup a remote tracking branch using <code>remote_name</code>. If <code>remote_name</code> is not supplied, use <code>origin</code> by default.</p>
|
||||
|
||||
<p> <finish></p>
|
||||
|
||||
<p> Merge and delete the chore branch.</p>
|
||||
|
|
@ -100,11 +104,14 @@ $ git commit -m "Some changes"
|
|||
...
|
||||
$ git checkout master
|
||||
$ git chore finish chore-123456
|
||||
|
||||
$ git chore -r upstream 123456
|
||||
</code></pre>
|
||||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Chris Hall <<a href="mailto:christopher.k.hall@gmail.com" data-bare-link="true">christopher.k.hall@gmail.com</a>> from bug/feature/refactor commands originally written by Jesús Espino <<a href="mailto:jespinog@gmail.com" data-bare-link="true">jespinog@gmail.com</a>></p>
|
||||
<p>Written by Chris Hall <<a href="mailto:christopher.k.hall@gmail.com" data-bare-link="true">christopher.k.hall@gmail.com</a>> from bug/feature/refactor commands originally written by Jesús Espino <<a href="mailto:jespinog@gmail.com" data-bare-link="true">jespinog@gmail.com</a>><br />
|
||||
Modified by Mark Pitman <<a href="mailto:mark.pitman@gmail.com" data-bare-link="true">mark.pitman@gmail.com</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -117,7 +124,7 @@ $ git chore finish chore-123456
|
|||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>December 2015</li>
|
||||
<li class='tc'>July 2017</li>
|
||||
<li class='tr'>git-chore(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ git-chore(1) -- Create chore branch
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
`git-chore` [finish] <name>
|
||||
`git-chore` [-r|--remote [remote_name]] [finish] <name>
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
@ -11,6 +11,10 @@ git-chore(1) -- Create chore branch
|
|||
|
||||
## OPTIONS
|
||||
|
||||
<-r|--remote [remote_name]>
|
||||
|
||||
Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default.
|
||||
|
||||
<finish>
|
||||
|
||||
Merge and delete the chore branch.
|
||||
|
|
@ -28,9 +32,12 @@ git-chore(1) -- Create chore branch
|
|||
$ git checkout master
|
||||
$ git chore finish chore-123456
|
||||
|
||||
$ git chore -r upstream 123456
|
||||
|
||||
## AUTHOR
|
||||
|
||||
Written by Chris Hall <<christopher.k.hall@gmail.com>> from bug/feature/refactor commands originally written by Jesús Espino <<jespinog@gmail.com>>
|
||||
Written by Chris Hall <<christopher.k.hall@gmail.com>> from bug/feature/refactor commands originally written by Jesús Espino <<jespinog@gmail.com>>
|
||||
Modified by Mark Pitman <<mark.pitman@gmail.com>>
|
||||
|
||||
## REPORTING BUGS
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,24 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-CREATE\-BRANCH" "1" "December 2015" "" ""
|
||||
.TH "GIT\-CREATE\-BRANCH" "1" "July 2017" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-create\-branch\fR \- Create branches
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
\fBgit\-create\-branch\fR <branchname>
|
||||
\fBgit\-create\-branch\fR [\-r|\-\-remote [remote_name]] <branchname>
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
Creates local and remote branch named <branchname>\.
|
||||
Creates local branch named <branchname> and optionally sets up a remote tracking branch\.
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
<\-r|\-\-remote [remote_name]>
|
||||
.
|
||||
.P
|
||||
Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\.
|
||||
.
|
||||
.P
|
||||
<branchname>
|
||||
.
|
||||
.P
|
||||
|
|
@ -23,12 +29,22 @@ The name of the branch to create\.
|
|||
.nf
|
||||
|
||||
$ git create\-branch integration
|
||||
|
||||
$ git create\-branch \-r integration
|
||||
|
||||
$ git create\-branch \-r upstream integration
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "NOTES"
|
||||
As of 4\.4\.0, the default behavior has changed\. \fBgit\-create\-branch\fR will no longer automatically setup a remote tracking branch unless the \fB\-r|\-remote\fR option is specified\.
|
||||
.
|
||||
.SH "AUTHOR"
|
||||
Written by Jonhnny Weslley <\fIjw@jonhnnyweslley\.net\fR>
|
||||
.
|
||||
.br
|
||||
Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR>
|
||||
.
|
||||
.SH "REPORTING BUGS"
|
||||
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
|
||||
.
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
<a href="#DESCRIPTION">DESCRIPTION</a>
|
||||
<a href="#OPTIONS">OPTIONS</a>
|
||||
<a href="#EXAMPLES">EXAMPLES</a>
|
||||
<a href="#NOTES">NOTES</a>
|
||||
<a href="#AUTHOR">AUTHOR</a>
|
||||
<a href="#REPORTING-BUGS">REPORTING BUGS</a>
|
||||
<a href="#SEE-ALSO">SEE ALSO</a>
|
||||
|
|
@ -76,14 +77,18 @@
|
|||
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||
|
||||
<p><code>git-create-branch</code> <branchname></p>
|
||||
<p><code>git-create-branch</code> [-r|--remote [remote_name]] <branchname></p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
<p> Creates local and remote branch named <branchname>.</p>
|
||||
<p> Creates local branch named <branchname> and optionally sets up a remote tracking branch.</p>
|
||||
|
||||
<h2 id="OPTIONS">OPTIONS</h2>
|
||||
|
||||
<p> <-r|--remote [remote_name]></p>
|
||||
|
||||
<p> Setup a remote tracking branch using <code>remote_name</code>. If <code>remote_name</code> is not supplied, use <code>origin</code> by default.</p>
|
||||
|
||||
<p> <branchname></p>
|
||||
|
||||
<p> The name of the branch to create.</p>
|
||||
|
|
@ -91,11 +96,20 @@
|
|||
<h2 id="EXAMPLES">EXAMPLES</h2>
|
||||
|
||||
<pre><code>$ git create-branch integration
|
||||
|
||||
$ git create-branch -r integration
|
||||
|
||||
$ git create-branch -r upstream integration
|
||||
</code></pre>
|
||||
|
||||
<h2 id="NOTES">NOTES</h2>
|
||||
|
||||
<p>As of 4.4.0, the default behavior has changed. <code>git-create-branch</code> will no longer automatically setup a remote tracking branch unless the <code>-r|-remote</code> option is specified.</p>
|
||||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Jonhnny Weslley <<a href="mailto:jw@jonhnnyweslley.net" data-bare-link="true">jw@jonhnnyweslley.net</a>></p>
|
||||
<p>Written by Jonhnny Weslley <<a href="mailto:jw@jonhnnyweslley.net" data-bare-link="true">jw@jonhnnyweslley.net</a>><br />
|
||||
Modified by Mark Pitman <<a href="mailto:mark.pitman@gmail.com" data-bare-link="true">mark.pitman@gmail.com</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -108,7 +122,7 @@
|
|||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>December 2015</li>
|
||||
<li class='tc'>July 2017</li>
|
||||
<li class='tr'>git-create-branch(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,18 @@ git-create-branch(1) -- Create branches
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
`git-create-branch` <branchname>
|
||||
`git-create-branch` [-r|--remote [remote_name]] <branchname>
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
Creates local and remote branch named <branchname>.
|
||||
Creates local branch named <branchname> and optionally sets up a remote tracking branch.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
<-r|--remote [remote_name]>
|
||||
|
||||
Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default.
|
||||
|
||||
<branchname>
|
||||
|
||||
The name of the branch to create.
|
||||
|
|
@ -19,9 +23,17 @@ git-create-branch(1) -- Create branches
|
|||
|
||||
$ git create-branch integration
|
||||
|
||||
$ git create-branch -r integration
|
||||
|
||||
$ 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.
|
||||
## AUTHOR
|
||||
|
||||
Written by Jonhnny Weslley <<jw@jonhnnyweslley.net>>
|
||||
Written by Jonhnny Weslley <<jw@jonhnnyweslley.net>>
|
||||
Modified by Mark Pitman <<mark.pitman@gmail.com>>
|
||||
|
||||
## REPORTING BUGS
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-FEATURE" "1" "December 2015" "" ""
|
||||
.TH "GIT\-FEATURE" "1" "July 2017" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-feature\fR \- Create/Merge feature branch
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
\fBgit\-feature\fR [\-a|\-\-alias branch_prefix] [finish] <name>
|
||||
\fBgit\-feature\fR [\-a|\-\-alias branch_prefix] [\-r|\-\-remote [remote_name]] [finish] <name>
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
Create/Merge the given feature branch
|
||||
|
|
@ -19,6 +19,12 @@ Create/Merge the given feature branch
|
|||
use \fBbranch_prefix\fR instead of \fBfeature\fR
|
||||
.
|
||||
.P
|
||||
<\-r|\-\-remote [remote_name]>
|
||||
.
|
||||
.P
|
||||
Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\.
|
||||
.
|
||||
.P
|
||||
<finish>
|
||||
.
|
||||
.P
|
||||
|
|
@ -46,12 +52,17 @@ $ git features dependencies
|
|||
$ (features/dependencies) \.\.\.
|
||||
$ (features/dependencies) git checkout master
|
||||
$ git features finish dependencies
|
||||
|
||||
$ git feature dependencies \-r upstream
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "AUTHOR"
|
||||
Written by Jesús Espino <\fIjespinog@gmail\.com\fR>
|
||||
.
|
||||
.br
|
||||
Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR>
|
||||
.
|
||||
.SH "REPORTING BUGS"
|
||||
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
|
||||
.
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||
|
||||
<p><code>git-feature</code> [-a|--alias branch_prefix] [finish] <name></p>
|
||||
<p><code>git-feature</code> [-a|--alias branch_prefix] [-r|--remote [remote_name]] [finish] <name></p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
|
|
@ -88,6 +88,10 @@
|
|||
|
||||
<p> use <code>branch_prefix</code> instead of <code>feature</code></p>
|
||||
|
||||
<p> <-r|--remote [remote_name]></p>
|
||||
|
||||
<p> Setup a remote tracking branch using <code>remote_name</code>. If <code>remote_name</code> is not supplied, use <code>origin</code> by default.</p>
|
||||
|
||||
<p> <finish></p>
|
||||
|
||||
<p> Merge and delete the feature branch.</p>
|
||||
|
|
@ -110,11 +114,14 @@ $ git features dependencies
|
|||
$ (features/dependencies) ...
|
||||
$ (features/dependencies) git checkout master
|
||||
$ git features finish dependencies
|
||||
|
||||
$ git feature dependencies -r upstream
|
||||
</code></pre>
|
||||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Jesús Espino <<a href="mailto:jespinog@gmail.com" data-bare-link="true">jespinog@gmail.com</a>></p>
|
||||
<p>Written by Jesús Espino <<a href="mailto:jespinog@gmail.com" data-bare-link="true">jespinog@gmail.com</a>><br />
|
||||
Modified by Mark Pitman <<a href="mailto:mark.pitman@gmail.com" data-bare-link="true">mark.pitman@gmail.com</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -127,7 +134,7 @@ $ git features finish dependencies
|
|||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>December 2015</li>
|
||||
<li class='tc'>July 2017</li>
|
||||
<li class='tr'>git-feature(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ git-feature(1) -- Create/Merge feature branch
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
`git-feature` [-a|--alias branch_prefix] [finish] <name>
|
||||
`git-feature` [-a|--alias branch_prefix] [-r|--remote [remote_name]] [finish] <name>
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
@ -15,6 +15,10 @@ git-feature(1) -- Create/Merge feature branch
|
|||
|
||||
use `branch_prefix` instead of `feature`
|
||||
|
||||
<-r|--remote [remote_name]>
|
||||
|
||||
Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default.
|
||||
|
||||
<finish>
|
||||
|
||||
Merge and delete the feature branch.
|
||||
|
|
@ -38,9 +42,12 @@ git-feature(1) -- Create/Merge feature branch
|
|||
$ (features/dependencies) git checkout master
|
||||
$ git features finish dependencies
|
||||
|
||||
$ git feature dependencies -r upstream
|
||||
|
||||
## AUTHOR
|
||||
|
||||
Written by Jesús Espino <<jespinog@gmail.com>>
|
||||
Written by Jesús Espino <<jespinog@gmail.com>>
|
||||
Modified by Mark Pitman <<mark.pitman@gmail.com>>
|
||||
|
||||
## REPORTING BUGS
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,24 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-REFACTOR" "1" "December 2015" "" ""
|
||||
.TH "GIT\-REFACTOR" "1" "July 2017" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-refactor\fR \- Create refactor branch
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
\fBgit\-refactor\fR [finish] <name>
|
||||
\fBgit\-refactor\fR [\-r|\-\-remote [remote_name]] [finish] <name>
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
Create the given refactor branch
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
<\-r|\-\-remote [remote_name]>
|
||||
.
|
||||
.P
|
||||
Setup a remote tracking branch using \fBremote_name\fR\. If \fBremote_name\fR is not supplied, use \fBorigin\fR by default\.
|
||||
.
|
||||
.P
|
||||
<finish>
|
||||
.
|
||||
.P
|
||||
|
|
@ -34,12 +40,17 @@ $ git commit \-m "Some changes"
|
|||
\.\.\.
|
||||
$ git checkout master
|
||||
$ git refactor finish mainlib_refactor
|
||||
|
||||
$ $ git refactor \-r upstream mainlib_refactor
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "AUTHOR"
|
||||
Written by Jesús Espino <\fIjespinog@gmail\.com\fR>
|
||||
.
|
||||
.br
|
||||
Modified by Mark Pitman <\fImark\.pitman@gmail\.com\fR>
|
||||
.
|
||||
.SH "REPORTING BUGS"
|
||||
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
|
||||
.
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||
|
||||
<p><code>git-refactor</code> [finish] <name></p>
|
||||
<p><code>git-refactor</code> [-r|--remote [remote_name]] [finish] <name></p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
|
|
@ -84,6 +84,10 @@
|
|||
|
||||
<h2 id="OPTIONS">OPTIONS</h2>
|
||||
|
||||
<p> <-r|--remote [remote_name]></p>
|
||||
|
||||
<p> Setup a remote tracking branch using <code>remote_name</code>. If <code>remote_name</code> is not supplied, use <code>origin</code> by default.</p>
|
||||
|
||||
<p> <finish></p>
|
||||
|
||||
<p> Merge and delete the refactor branch.</p>
|
||||
|
|
@ -100,11 +104,14 @@ $ git commit -m "Some changes"
|
|||
...
|
||||
$ git checkout master
|
||||
$ git refactor finish mainlib_refactor
|
||||
|
||||
$ $ git refactor -r upstream mainlib_refactor
|
||||
</code></pre>
|
||||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Jesús Espino <<a href="mailto:jespinog@gmail.com" data-bare-link="true">jespinog@gmail.com</a>></p>
|
||||
<p>Written by Jesús Espino <<a href="mailto:jespinog@gmail.com" data-bare-link="true">jespinog@gmail.com</a>><br />
|
||||
Modified by Mark Pitman <<a href="mailto:mark.pitman@gmail.com" data-bare-link="true">mark.pitman@gmail.com</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -117,7 +124,7 @@ $ git refactor finish mainlib_refactor
|
|||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>December 2015</li>
|
||||
<li class='tc'>July 2017</li>
|
||||
<li class='tr'>git-refactor(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ git-refactor(1) -- Create refactor branch
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
`git-refactor` [finish] <name>
|
||||
`git-refactor` [-r|--remote [remote_name]] [finish] <name>
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
@ -11,6 +11,10 @@ git-refactor(1) -- Create refactor branch
|
|||
|
||||
## OPTIONS
|
||||
|
||||
<-r|--remote [remote_name]>
|
||||
|
||||
Setup a remote tracking branch using `remote_name`. If `remote_name` is not supplied, use `origin` by default.
|
||||
|
||||
<finish>
|
||||
|
||||
Merge and delete the refactor branch.
|
||||
|
|
@ -28,9 +32,12 @@ git-refactor(1) -- Create refactor branch
|
|||
$ git checkout master
|
||||
$ git refactor finish mainlib_refactor
|
||||
|
||||
$ $ git refactor -r upstream mainlib_refactor
|
||||
|
||||
## AUTHOR
|
||||
|
||||
Written by Jesús Espino <<jespinog@gmail.com>>
|
||||
Written by Jesús Espino <<jespinog@gmail.com>>
|
||||
Modified by Mark Pitman <<mark.pitman@gmail.com>>
|
||||
|
||||
## REPORTING BUGS
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue