Skip to content

Instantly share code, notes, and snippets.

@KevM
Created December 1, 2011 21:36
Show Gist options
  • Select an option

  • Save KevM/1420048 to your computer and use it in GitHub Desktop.

Select an option

Save KevM/1420048 to your computer and use it in GitHub Desktop.
Keeping a local branch up to date
[alias]
st = status
c = commit -m
aa = add -A
fa = fetch --all
co = checkout
pu = clean -dfx
cu = !git fetch --all && git pull --rebase origin && git submodule update
new = checkout -b
done = !git fetch && git rebase origin/master && git checkout master && git merge @{-1} && rake && git push
Yuck
git checkout master;
git pull origin master;
git checkout working;
git rebase master;
git checkout master;
git merge working;
git checkout working
@phatboyg

phatboyg commented Dec 1, 2011

Copy link
Copy Markdown

This is basically what I do as well... Seems tedious, but keeps the history clean.

Except I don't go back into master until I'm ready to push to origin.

@KevM

KevM commented Dec 1, 2011

Copy link
Copy Markdown
Author

Dru just showed me his git aliases. Adding above.

@phatboyg

phatboyg commented Dec 1, 2011

Copy link
Copy Markdown

new is nice, done seems like it does a LOT

@jmarnold

jmarnold commented Dec 1, 2011

Copy link
Copy Markdown

@KevM
Have you tried something like this? https://gist.github.com/1280290

@KevM

KevM commented Dec 1, 2011 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment