Add suckto from work computer's .zsh_local
This commit is contained in:
parent
d8ef23aa61
commit
3fa1c08a53
|
@ -16,6 +16,16 @@ function slides() {
|
||||||
PATH="$OLD_PATH"
|
PATH="$OLD_PATH"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function suckto {
|
||||||
|
local dest_branch="$1"
|
||||||
|
changed_files="$(git status --porcelain=v1 2>/dev/null | wc -l)"
|
||||||
|
git suck
|
||||||
|
git switch -c "$dest_branch"
|
||||||
|
if [[ "$changed_files" != "0" ]]; then
|
||||||
|
git stash pop
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function integrate {
|
function integrate {
|
||||||
local from="$(realpath $1)"
|
local from="$(realpath $1)"
|
||||||
if [[ "$from" == "$f"* ]]; then
|
if [[ "$from" == "$f"* ]]; then
|
||||||
|
|
Loading…
Reference in New Issue