Added git-create-branch

This commit is contained in:
Jonhnny Weslley 2011-02-22 16:53:51 -03:00
parent 1a1a722527
commit b74a9d7080
6 changed files with 261 additions and 55 deletions

View file

@ -1,80 +1,88 @@
0.0.8 / 2011-02-22
==================
* Added `git-create-branch`.
* Refactoring to adopt uniq code style across the scripts.
* git-release: Use annotated tags to release commits instead of lightweight tags.
* git-setup: Create a directory if the provided one doesn't exist yet.
* Fixed `git-ignore`: Don't fail if `.gitignore` file doesn't exist yet.
0.0.7 / 2010-10-31
==================
* Added man pages [Jonhnny Weslley]
* Added `make clean`
* Added `make docs`
* Added -d -> -D. Closes #15
* Added git-delete-submodule for delete submodules easily [Jonhnny Weslley]
* Added; `git-ignore` now shows the contents of _./.git-ignore_ if no args are present
* Added man pages.
* Added `make clean`.
* Added `make docs`.
* Added -d -> -D. Closes #15.
* Added git-delete-submodule for delete submodules easily.
* Added; `git-ignore` now shows the contents of _./.git-ignore_ if no args are present.
0.0.6 / 2010-10-22
==================
* Added command `git-touch`. [Alex McHale]
* Use a shallow clone in `git-update-extras`. [Devin Withers]
* Create History.md if git-changelog can't find a target. Fixes #14. [Devin Withers]
* Bump version
* Added command `git-touch`.
* Use a shallow clone in `git-update-extras`.
* Create History.md if git-changelog can't find a target. Fixes #14.
0.0.5 / 2010-10-08
==================
* Added `git-delete-submodule` [Jonhnny Weslley]
* Added; `git-ignore` without pattern shows .gitignore contents [Jonhnny Weslley]
* Added; `git-setup` argument is now optional, defaulting to the CWD
* Added REPL alias "ls" as ls-files
* Added `git-delete-submodule`.
* Added; `git-ignore` without pattern shows .gitignore contents.
* Added; `git-setup` argument is now optional, defaulting to the CWD.
* Added REPL alias "ls" as ls-files.
0.0.4 / 2010-09-10
==================
* Added: `git-delete-branch`: Also delete the remote branch [Gert Van Gool]
* Added `git-summary` commitish support [Jonathan Leto]
* Added `git-graft` dest branch default of _master_
* Added `git-setup` [Aggelos Orfanakos]
* Added `git-graft` [Kenneth Reitz]
* Added `git-undo` for removing recent commits. [Kenneth Reitz]
* Fixed `git-delete-branch`: Don't fail if the local branch doesn't exist [Gert Van Gool]
* Fixed __PREFIX__ to respect env vars
* Fixed shift in `git-count`
* Added: `git-delete-branch`: Also delete the remote branch.
* Added `git-summary` commitish support.
* Added `git-graft` dest branch default of _master_.
* Added `git-setup`.
* Added `git-graft`.
* Added `git-undo` for removing recent commits.
* Fixed `git-delete-branch`: Don't fail if the local branch doesn't exist.
* Fixed __PREFIX__ to respect env vars.
* Fixed shift in `git-count`.
0.0.3 / 2010-08-27
0.0.3 / 2010-08-27
==================
* Added `git-extras-version`
* Added `git-update-extras`
* Fixed `git-contrib` issue when the username is in a commit msg
* Fixed; delete remote tag only if local was deleted [Aggelos Orfanakos]
* Fixed; delete remote branch only if local was deleted [Aggelos Orfanakos]
* Fixed printing of authors for git-summary's on Ubuntu [jason young]
* Fixed; read doesn't have the -e option in SH on my machine at least. [Nick Campbell]
* Added `git-extras-version`.
* Added `git-update-extras`.
* Fixed `git-contrib` issue when the username is in a commit msg.
* Fixed: delete remote tag only if local was deleted.
* Fixed: delete remote branch only if local was deleted.
* Fixed printing of authors for git-summary's on Ubuntu.
* Fixed: read doesn't have the -e option in SH on my machine at least.
0.0.2 / 2010-08-24
==================
* Added `git-summary`
* Added `git-commits-since`
* Added `git-repl`
* Added `git-delete-tag`
* Added `git-delete-branch`
* Added `git-contrib`
* Fixed handling off spaces in contributor's name for `git-contrib` [Domenico Rotiroti]
* Fixed spaces in `git-release` names/numbers [Domenico Rotiroti]
* Fixed readme
* Added `git-summary`.
* Added `git-commits-since`.
* Added `git-repl`.
* Added `git-delete-tag`.
* Added `git-delete-branch`.
* Added `git-contrib`.
* Fixed handling off spaces in contributor's name for `git-contrib`.
* Fixed spaces in `git-release` names/numbers.
* Fixed readme.
0.0.1 / 2010-08-05
==================
* Docs for git-ignore. Closes #3
* Merge branch 'ignore'
* Added git-ignore
* Readme typo
* Fixed <tag> in docs
* Install docs
* Merge branch 'release'
* Added git-release
* Fixed readme
* Readme
* Passing args to git shortlog
* Added --all support to git-count
* Initial commit
* Docs for `git-ignore`. Closes #3.
* Merge branch 'ignore'.
* Added `git-ignore`.
* Readme typo.
* Fixed <tag> in docs.
* Install docs.
* Merge branch 'release'.
* Added `git-release`.
* Fixed readme.
* Readme.
* Passing args to git shortlog.
* Added --all support to git-count.
* Initial commit.

View file

@ -23,6 +23,7 @@ Brew (buggy):
- git changelog
- git commits-since
- git count
- git create-branch
- git delete-branch
- git delete-submodule
- git delete-tag
@ -178,8 +179,11 @@ of commits included in the commitish:
*.o
*.log
Adding patterns from an existing template:
$ git ignore -t rails
## git-create-branch &lt;name&gt;
Creates local and remote branch _name_.
$ git create-branch development
## git-delete-branch &lt;name&gt;

9
bin/git-create-branch Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
branch=$1
test -z $branch && echo "branch required." && exit 1
git push origin origin:refs/heads/$branch
git fetch origin
git checkout --track -b $branch origin/$branch
git pull

36
man/git-create-branch.1 Normal file
View file

@ -0,0 +1,36 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-CREATE\-BRANCH" "1" "February 2011" "" "Git Extras"
.
.SH "NAME"
\fBgit\-create\-branch\fR \- Create branches
.
.SH "SYNOPSIS"
\fBgit\-create\-branch\fR <branchname>
.
.SH "DESCRIPTION"
Creates local and remote branch named <branchname>\.
.
.SH "OPTIONS"
<branchname>
.
.P
The name of the branch to create\.
.
.SH "EXAMPLES"
.
.nf
$ git create\-branch integration
.
.fi
.
.SH "AUTHOR"
Written by Jonhnny Weslley <\fIjw@jonhnnyweslley\.net\fR>
.
.SH "REPORTING BUGS"
<\fIhttp://github\.com/visionmedia/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttp://github\.com/visionmedia/git\-extras\fR>

View file

@ -0,0 +1,117 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' value='text/html;charset=utf8'>
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
<title>git-create-branch(1) - Create branches</title>
<style type='text/css' media='all'>
/* style: man */
body#manpage {margin:0}
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
.mp h2 {margin:10px 0 0 0}
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
.mp h3 {margin:0 0 0 4ex}
.mp dt {margin:0;clear:left}
.mp dt.flush {float:left;width:8ex}
.mp dd {margin:0 0 0 9ex}
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
.mp pre {margin-bottom:20px}
.mp pre+h2,.mp pre+h3 {margin-top:22px}
.mp h2+pre,.mp h3+pre {margin-top:5px}
.mp img {display:block;margin:auto}
.mp h1.man-title {display:none}
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
.mp h2 {font-size:16px;line-height:1.25}
.mp h1 {font-size:20px;line-height:2}
.mp {text-align:justify;background:#fff}
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
.mp u {text-decoration:underline}
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
.mp b.man-ref {font-weight:normal;color:#434241}
.mp pre {padding:0 4ex}
.mp pre code {font-weight:normal;color:#434241}
.mp h2+pre,h3+pre {padding-left:0}
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
ol.man-decor {width:100%}
ol.man-decor li.tl {text-align:left}
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
ol.man-decor li.tr {text-align:right;float:right}
</style>
</head>
<!--
The following styles are deprecated and will be removed at some point:
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
.man-navigation should be used instead.
-->
<body id='manpage'>
<div class='mp' id='man'>
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#DESCRIPTION">DESCRIPTION</a>
<a href="#OPTIONS">OPTIONS</a>
<a href="#EXAMPLES">EXAMPLES</a>
<a href="#AUTHOR">AUTHOR</a>
<a href="#REPORTING-BUGS">REPORTING BUGS</a>
<a href="#SEE-ALSO">SEE ALSO</a>
</div>
<ol class='man-decor man-head man head'>
<li class='tl'>git-create-branch(1)</li>
<li class='tc'>Git Extras</li>
<li class='tr'>git-create-branch(1)</li>
</ol>
<h2 id="NAME">NAME</h2>
<p class="man-name">
<code>git-create-branch</code> - <span class="man-whatis">Create branches</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p><code>git-create-branch</code> &lt;branchname&gt;</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p> Creates local and remote branch named &lt;branchname&gt;.</p>
<h2 id="OPTIONS">OPTIONS</h2>
<p> &lt;branchname&gt;</p>
<p> The name of the branch to create.</p>
<h2 id="EXAMPLES">EXAMPLES</h2>
<pre><code>$ git create-branch integration
</code></pre>
<h2 id="AUTHOR">AUTHOR</h2>
<p>Written by Jonhnny Weslley &lt;<a href="&#x6d;&#97;&#x69;&#x6c;&#x74;&#111;&#58;&#x6a;&#x77;&#x40;&#106;&#111;&#110;&#x68;&#110;&#110;&#x79;&#x77;&#x65;&#115;&#x6c;&#x6c;&#x65;&#121;&#x2e;&#x6e;&#x65;&#x74;" data-bare-link="true">&#x6a;&#119;&#x40;&#106;&#111;&#x6e;&#104;&#x6e;&#x6e;&#121;&#119;&#101;&#115;&#x6c;&#108;&#101;&#121;&#46;&#110;&#101;&#116;</a>&gt;</p>
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
<p>&lt;<a href="http://github.com/visionmedia/git-extras/issues" data-bare-link="true">http://github.com/visionmedia/git-extras/issues</a>&gt;</p>
<h2 id="SEE-ALSO">SEE ALSO</h2>
<p>&lt;<a href="http://github.com/visionmedia/git-extras" data-bare-link="true">http://github.com/visionmedia/git-extras</a>&gt;</p>
<ol class='man-decor man-foot man foot'>
<li class='tl'></li>
<li class='tc'>February 2011</li>
<li class='tr'>git-create-branch(1)</li>
</ol>
</div>
</body>
</html>

32
man/git-create-branch.md Normal file
View file

@ -0,0 +1,32 @@
git-create-branch(1) -- Create branches
=======================================
## SYNOPSIS
`git-create-branch` &lt;branchname&gt;
## DESCRIPTION
Creates local and remote branch named &lt;branchname&gt;.
## OPTIONS
&lt;branchname&gt;
The name of the branch to create.
## EXAMPLES
$ git create-branch integration
## AUTHOR
Written by Jonhnny Weslley &lt;<jw@jonhnnyweslley.net>&gt;
## REPORTING BUGS
&lt;<http://github.com/visionmedia/git-extras/issues>&gt;
## SEE ALSO
&lt;<http://github.com/visionmedia/git-extras>&gt;