- added 'gfa' alias - git fetch all, and follow new remote branches

- added 'git_new_branch' finction - create new branch, push it to remote and follow
pull/337/head
Sergey Zhumatiy 2014-09-15 22:05:06 +04:00
parent f8a4a72080
commit 34a7799eaa
2 changed files with 9 additions and 0 deletions

View File

@ -9,6 +9,7 @@ alias gus='git reset HEAD'
alias gm="git merge" alias gm="git merge"
alias g='git' alias g='git'
alias get='git' alias get='git'
alias gfa='git fetch -a; for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do git branch --track ${branch#remotes/origin/} $branch; done'
alias gst='git status' alias gst='git status'
alias gs='git status' alias gs='git status'
alias gss='git status -s' alias gss='git status -s'

View File

@ -1,6 +1,14 @@
cite about-plugin cite about-plugin
about-plugin 'git helper functions' about-plugin 'git helper functions'
function git_new_branch {
about 'adds new branch $1 and tracks it on origin'
group 'git'
echo "Running: git checkout -b $1; git push -u origin $1"
git checkout -b "$1"; git push -u origin "$1"
}
function git_remote { function git_remote {
about 'adds remote $GIT_HOSTING:$1 to current repo' about 'adds remote $GIT_HOSTING:$1 to current repo'
group 'git' group 'git'