aanand/git-up

View on GitHub
man/git-up.1

Summary

Maintainability
Test Coverage
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-UP" "1" "April 2016" "" ""
.
.SH "NAME"
\fBgit\-up\fR \- fetch and rebase all locally\-tracked remote branches
.
.P
 \fIhttps://codeclimate\.com/github/aanand/git\-up\fR
.
.SH "WARNING"
This project is no longer maintained, for several reasons:
.
.IP "\(bu" 4
I\'ve stopped using the workflow that made it relevant to me\.
.
.IP "\(bu" 4
Git 2\.0 updated the default behaviour to remove the main problem it was solving (by changing the default behaviour of \fBgit push\fR so it acts only on the current branch, instead of all branches)\.
.
.IP "\(bu" 4
Auto\-stashing is now supported natively with \fBgit rebase \-\-autostash\fR\.
.
.IP "" 0
.
.P
Accordingly, this line will get you a \fBgit up\fR that works just as well and doesn\'t involve installing any Ruby:
.
.IP "" 4
.
.nf

git config \-\-global alias\.up \e
  \'!git fetch && git rebase \-\-autostash FETCH_HEAD\'
.
.fi
.
.IP "" 0
.
.SH "SYNOPSIS"
\fBgit pull\fR has two problems:
.
.IP "\(bu" 4
It merges upstream changes by default, when it\'s really more polite to rebase over them \fIhttp://gitready\.com/advanced/2009/02/11/pull\-with\-rebase\.html\fR, unless your collaborators enjoy a commit graph that looks like bedhead\.
.
.IP "\(bu" 4
It only updates the branch you\'re currently on, which means \fBgit push\fR will shout at you for being behind on branches you don\'t particularly care about right now\.
.
.IP "" 0
.
.P
Solve them once and for all\.
.
.SH "INSTALL"
.
.nf

$ gem install git\-up
.
.fi
.
.P
Windows support is predictably absent\. Try the Python port \fIhttps://github\.com/msiemens/PyGitUp\fR, which was started for that reason\.
.
.SH "USE"
.
.nf

$ git up
.
.fi
.
.SH "ALTHOUGH"
\fBgit\-up\fR is working well for a lot of people, but a rigorous proof has yet to be formulated that it will definitely not mess with your git setup, delete data or post inane drivel to Hacker News on your behalf\. Best practice is to delete your Hacker News account before installing\.
.
.SH "DIFFICULTIES"
.
.SS "Windows"
Windows support is an ongoing pain\. Have a look at this ticket \fIhttps://github\.com/aanand/git\-up/issues/34\fR if you really need it, or if you\'re bored\.
.
.SS "spawn\.rb:187:in `_pspawn\': Invalid command name (ArgumentError)"
If you\'re using RVM and you get this error, read this \fIhttps://github\.com/aanand/git\-up/blob/master/RVM\.md\fR\.
.
.SH "CONFIGURATION"
\fBgit\-up\fR has a few configuration options, which use git\'s configuration system\. Each can be set either globally or per\-project\. To set an option globally, append the \fB\-\-global\fR flag to \fBgit config\fR, which you can run anywhere:
.
.IP "" 4
.
.nf

git config \-\-global git\-up\.bundler\.check true
.
.fi
.
.IP "" 0
.
.P
To set it within a project, run the command inside that project\'s directory and omit the \fB\-\-global\fR flag:
.
.IP "" 4
.
.nf

cd myproject
git config git\-up\.bundler\.check true
.
.fi
.
.IP "" 0
.
.SS "git\-up\.bundler\.check [true|false]"
Default: \fBfalse\fR\. If \fBtrue\fR, git\-up will check your app for any new bundled gems and suggest a \fBbundle install\fR if necessary\.
.
.SS "git\-up\.bundler\.autoinstall [true|false]"
Default: \fBfalse\fR\. If \fBtrue\fR, and if \fBgit\-up\.bundler\.check\fR is also set to \fBtrue\fR, git\-up will run \fBbundle install\fR for you if it finds missing gems\.
.
.SS "git\-up\.fetch\.prune [true|false]"
Default: \fBtrue\fR\. Append the \fB\-\-prune\fR flag when running \fBgit fetch\fR, if your git version supports it (1\.6\.6 or greater), telling it to remove any remote tracking branches which no longer exist on the remote \fIhttp://linux\.die\.net/man/1/git\-fetch\fR\.
.
.SS "git\-up\.fetch\.all [true|false]"
Default: \fBfalse\fR\. Normally, git\-up will only fetch remotes for which there is at least one local tracking branch\. Setting this option to \fBtrue\fR will make git\-up always fetch from all remotes, which is useful if e\.g\. you use a remote to push to your CI system but never check those branches out\.
.
.SS "git\-up\.rebase\.arguments [string]"
Default: \fBunset\fR\. Additional arguments to pass to \fBgit rebase\fR\. For example, setting this to \fB\-\-preserve\-merges\fR will recreate your merge commits in the rebased branch\.
.
.SS "git\-up\.rebase\.auto [true|false]"
Default: \fBtrue\fR\. If this option is set to \fBfalse\fR, git\-up will not rebase branches for you\. Instead, it will print a message saying they are diverged and let you handle rebasing them later\. This can be useful if you have a lot of in\-progress work that you don\'t want to deal with at once, but still want to update other branches\.
.
.SS "git\-up\.rebase\.log\-hook \"COMMAND\""
Default: \fBunset\fR\. Runs \fBCOMMAND\fR every time a branch is rebased or fast\-forwarded, with the old head as \fB$1\fR and the new head as \fB$2\fR\. This can be used to view logs or diffs of incoming changes\. For example: \fB\'echo "changes on $1:"; git log \-\-oneline \-\-decorate $1\.\.$2\'\fR