Created
March 15, 2012 20:44
-
-
Save havvg/2046776 to your computer and use it in GitHub Desktop.
git up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
up = !git merge --ff-only upstream/`git branch --no-color | grep -e '^\\*' | cut -d\" \" -f2` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not about
pull
from thetracking
branch, which would be altered by--set-upstream
as you mentioned.It's about having two different remote repositories to merge from.
Like I said, you have your like "central" (Yes, I know git is not centralized.) remote, where your company pushes to and pulls from (called
origin
). A cleanpush
andpull
will interact with that remote and their respective branches. You would track new branches from there -git co -b feature/new-feature --track origin/feature/new-feature
which allows simplegit push
andgit pull
.In addition you have the official remote repository called
upstream
. No one of your company is allowed to push to it, you only update from it. This is whatgit up
does.