[odrbin] add git-wtinit
This commit is contained in:
parent
fb5948cf79
commit
7cf76f6117
9
.local/odrbin/git-wtinit
Executable file
9
.local/odrbin/git-wtinit
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
worktree="$1"
|
||||
|
||||
[ -z "$REPONAME" ] && REPONAME="$(basename "$worktree" .git)"
|
||||
[ -z "$GITDIRS" ] && GITDIRS="$HOME/git/.gitdirs"
|
||||
|
||||
gitdir="$GITDIRS/$REPONAME"
|
||||
|
||||
git init --separate-git-dir "$gitdir" "$worktree"
|
Loading…
Reference in a new issue