mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
graft: Require destination branch. Fix #23
This is to avoid the old behaviour of automatically merging into master.
This commit is contained in:
parent
7d1ede1022
commit
3d0b4feb80
|
|
@ -4,6 +4,7 @@ src=$1
|
|||
dst=$2
|
||||
|
||||
test -z $src && echo "source branch required." 1>&2 && exit 1
|
||||
test -z $dst && echo "destination branch required." 1>&2 && exit 1
|
||||
|
||||
git checkout $dst \
|
||||
&& git merge --no-ff $src \
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
\fBgit\-graft\fR \- Merge and destroy a given branch
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
\fBgit\-graft\fR <src\-branch> [<dest\-branch>]
|
||||
\fBgit\-graft\fR <src\-branch> <dest\-branch>
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
Merge commits from <src\-branch> into <dest\-branch> which defaults to the current branch\.
|
||||
Merge commits from <src\-branch> into <dest\-branch>
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
<src\-branch>
|
||||
|
|
@ -23,7 +23,6 @@ Merge commits from <src\-branch> into <dest\-branch> which defaults to the curre
|
|||
.nf
|
||||
|
||||
$ git graft new_feature dev
|
||||
$ git graft new_feature
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
<ol class='man-decor man-head man head'>
|
||||
<li class='tl'>git-graft(1)</li>
|
||||
<li class='tc'></li>
|
||||
<li class='tc'>Git Extras</li>
|
||||
<li class='tr'>git-graft(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
@ -76,11 +76,11 @@
|
|||
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||
|
||||
<p><code>git-graft</code> <src-branch> [<dest-branch>]</p>
|
||||
<p><code>git-graft</code> <src-branch> <dest-branch></p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
<p> Merge commits from <src-branch> into <dest-branch> which defaults to the current branch.</p>
|
||||
<p> Merge commits from <src-branch> into <dest-branch></p>
|
||||
|
||||
<h2 id="OPTIONS">OPTIONS</h2>
|
||||
|
||||
|
|
@ -91,12 +91,11 @@
|
|||
<h2 id="EXAMPLES">EXAMPLES</h2>
|
||||
|
||||
<pre><code>$ git graft new_feature dev
|
||||
$ git graft new_feature
|
||||
</code></pre>
|
||||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Kenneth Reitz <<a href="mailto:me@kennethreitz.com" data-bare-link="true">me@kennethreitz.com</a>></p>
|
||||
<p>Written by Kenneth Reitz <<a href="mailto:me@kennethreitz.com" data-bare-link="true">me@kennethreitz.com</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ git-graft(1) -- Merge and destroy a given branch
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
`git-graft` <src-branch> [<dest-branch>]
|
||||
`git-graft` <src-branch> <dest-branch>
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
Merge commits from <src-branch> into <dest-branch> which defaults to the current branch.
|
||||
Merge commits from <src-branch> into <dest-branch>
|
||||
|
||||
## OPTIONS
|
||||
|
||||
|
|
@ -18,7 +18,6 @@ git-graft(1) -- Merge and destroy a given branch
|
|||
## EXAMPLES
|
||||
|
||||
$ git graft new_feature dev
|
||||
$ git graft new_feature
|
||||
|
||||
## AUTHOR
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue