From c6cc9f526eaf1ab3f676d37c4f11dc013bdcde2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 19 Oct 2017 12:15:35 +0200 Subject: Add gitbnew function to shellrc --- shellrc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'shellrc') diff --git a/shellrc b/shellrc index b26c8a8..321c10a 100644 --- a/shellrc +++ b/shellrc @@ -90,6 +90,15 @@ gitbmerge() { ) } +# Create new branch from master +gitbnew() { + git branch "$1" master + local NW="$(git rev-parse --show-toplevel)-$1" + git worktree add "$NW" $1 + cd "$NW" + git submodule update --init --recursive +} + # Make screenshot xshot() { import -window "$(xdotool selectwindow)" ~/xshot_$(date +%F_%H%M%S_%N).png -- cgit v1.2.3