Skip to content

Instantly share code, notes, and snippets.

@hibooboo2
Created March 3, 2014 21:58
Show Gist options
  • Save hibooboo2/9335545 to your computer and use it in GitHub Desktop.
Save hibooboo2/9335545 to your computer and use it in GitHub Desktop.
From http://nvie.com/posts/a-successful-git-branching-model/ Start a new Branch. AND OTHER AUTO MAGIC THINGS AS ALIAIS
[core]
editor = gedit -w
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[color "diff"]
whitespace = red reverse
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
[credential]
helper = cache --timeout=3600
[alias]
cm = !git add -p && git commit && git pull && git push
addDev = !git pull && git push && git checkout -b dev master && git push origin dev
startfeature = !git pull && git push && git checkout -b "$1" "$2" && echo "You made a new branch from another. Now implement the new feature."
finishfeature= !git pull && git push && git checkout "$2" && git pull origin "$2" && git merge --no-ff "$1" && git branch -d "$1" && git push origin "$2"
$ git checkout -b myfeature develop
Switched to a new branch "myfeature"
Add this:
[alias]
featureBranch= !git pull development && git checkout -b "$1" development
To your gitconfig so you can alias it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment