aboutsummaryrefslogtreecommitdiff
path: root/shellrc
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2017-10-19 12:15:35 +0200
committerKarel Kočí <karel.koci@nic.cz>2017-10-19 12:15:35 +0200
commitc6cc9f526eaf1ab3f676d37c4f11dc013bdcde2a (patch)
tree7a6c012eab0e1bd751fc641942a02aee5d20f66c /shellrc
parenta42357cc347f4c79c595c95202366cfb4aeea6a3 (diff)
downloadmyconfigs-c6cc9f526eaf1ab3f676d37c4f11dc013bdcde2a.tar.gz
myconfigs-c6cc9f526eaf1ab3f676d37c4f11dc013bdcde2a.tar.bz2
myconfigs-c6cc9f526eaf1ab3f676d37c4f11dc013bdcde2a.zip
Add gitbnew function to shellrc
Diffstat (limited to 'shellrc')
-rw-r--r--shellrc9
1 files changed, 9 insertions, 0 deletions
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