]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/git.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 6 Mar 2017 14:49:32 +0000 (14:49 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 6 Mar 2017 14:49:32 +0000 (14:49 +0000)
etc/profile.d/git.sh

index e35c0c23563e29fd47342053caf34fb5d21735d8..459a5e0fb7e50a1cd8eb20e4fcc9c6bc1d860764 100644 (file)
@@ -8,6 +8,11 @@ alias git_grep="git grep --color=auto"
 alias git_ls_tree="git ls-tree --full-tree -r HEAD"
 alias git_ls_files="git ls-files"
 
+git_new_branch() {
+  git checkout -b "$1"
+  git push -u origin "$1"
+}
+
 git_pull_reset() {
   local branch=$(git branch --list|awk '/\*/{print $2; exit}')
   [ -n "$1" ] && branch="$1"