public
Description: A tool to simplify working with remote branches
Homepage: http://grb.rubyforge.org/
Clone URL: git://github.com/webmat/git_remote_branch.git
Click here to lend your support to: git_remote_branch and make a donation at www.pledgie.com !
commit  a46c515157830a7c2382b954311d87dbbdf65b16
tree    70f4931e957df168754cc7cc63e972fa11f4b41a
parent  5c0e921f6edefa5a6229fe89150bdf130e4ceb2c
README
==== Why git_remote_branch? ====

The basic idea for git_remote_branch is to trivialize the interaction with
remote branches in simple situations. 

For now git_remote_branch assumes that the local and remote branches have the
same name. Multiple origins are supported.

Another goal of git_remote_branch is to help teach the real underlying git
commands. Each operation done on your behalf is displayed at the console.



==== Installation ====

  sudo gem install grb


Or if you want the bleeding edge from GitHub
You may try
  sudo gem install webmat-git_remote_branch --source=http://gems.github.com

But you're probably better off with
  git clone git://github.com/webmat/git_remote_branch.git
  rake install



==== Usage ====

Notes: 
- parts between brackets are optional
- When 'origin_server' is not specified, the name 'origin' is assumed.

Available commands (with aliases):


== Help ==

$ grb [-h|help]    #=> Displays help

== create (alias: new) ==
Create a new local branch as well as a corresponding remote branch from the
branch you are currently on.
Automatically track the new remote branch (useful for pulling and merging).
Switch to the new branch.

$ grb create branch_name [origin_server]


== publish (aliases: remotize) ==
Publish an existing local branch to the remote server.
Set up the local branch to track the new remote branch.
Switch to the new branch.

$ grb publish branch_name [origin_server]


== delete (aliases: destroy, kill, remove) ==
Delete the remote branch then delete the local branch.
The local branch is not deleted if there are pending changes.

$ grb delete branch_name [origin_server]


== track (aliases: follow grab fetch) ==
Track an existing remote branch locally.

$ grb track branch_name [origin_server]


== rename (aliases: rn, mv, move) ==
To rename the branch you're currently on.
Rename the remote branch by copying then deleting the old name.
Checkout a new local tracking branch with the new name and delete the local
branch with the old name.

$ grb rename branch_name [origin_server]


== explain ==

All commands can be prepended by the word 'explain'.  Instead of executing the
command, git_remote_branch will simply output the list of commands you need to
run to accomplish that goal.
Examples: 

$ grb explain create
git_remote_branch version 0.2.6

List of operations to do to create a new remote branch and track it locally:

git push origin master:refs/heads/branch_to_create
git fetch origin
git branch --track branch_to_create origin/branch_to_create
git checkout branch_to_create


$ grb explain create my_branch github
git_remote_branch version 0.2.6

List of operations to do to create a new remote branch and track it locally:

git push github master:refs/heads/my_branch
git fetch github
git branch --track my_branch github/my_branch
git checkout my_branch



==== More on git_remote_branch ====

Site:         http://github.com/webmat/git_remote_branch
Mailing list: http://groups.google.com/group/git_remote_branch



==== History ====

This script was originally created by Carl Mercier and made public on his blog
here:

No nonsense GIT, part 1: git-remote-branch
http://blog.carlmercier.com/2008/01/25/no-nonsense-git-part-1-git-remote-branch/


I'm using it as a starting point to make it even easier to interact with remote
repositories.


== Contributors ==

- Mathieu Martin  webmat@gmail.com
- Carl Mercier    (Carl: want your email here?)
- Caio Chassot    dev@caiochassot.com


== Legalese ==

git_remote_branch is licensed under the MIT License. See the file COPYING for details.