Created
July 27, 2012 07:58
-
-
Save yywill/3186730 to your computer and use it in GitHub Desktop.
GIT: create a new branch and syn with remote
This file contains hidden or 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
#!/bin/sh | |
BRANCH=${1} | |
git init | |
git add . | |
git branch $BRANCH | |
git checkout $BRANCH | |
git remote add origin git@github.com:yywill/code_trash | |
git push origin $BRANCH | |
# git prety print | |
# using "git lg" | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment