Compare commits
4 Commits
3e1474040d
...
66c7a56a8e
| Author | SHA1 | Date | |
|---|---|---|---|
| 66c7a56a8e | |||
| 53d2a33ddf | |||
| d13b8756c9 | |||
| 83728cdbe5 |
@@ -9,9 +9,11 @@ alias girlboss="sudo"
|
|||||||
alias vialias="nvim $HOME/.oh-my-zsh/custom/aliases.zsh"
|
alias vialias="nvim $HOME/.oh-my-zsh/custom/aliases.zsh"
|
||||||
|
|
||||||
alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
|
alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
|
||||||
|
alias update-submodules="git submodules update --recursive --init"
|
||||||
|
|
||||||
#############
|
#############
|
||||||
## Scripts ##
|
## Scripts ##
|
||||||
#############
|
#############
|
||||||
|
|
||||||
alias cherry-merge="$ZSH_CUSTOM/scripts/cherry-merge.sh"
|
alias cherry-merge="$ZSH_CUSTOM/scripts/cherry-merge.sh"
|
||||||
|
alias push-main-current="$ZSH_CUSTOM/scripts/push-main-current.sh"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if [ $MAIN_BRANCH == $TARGET_BRANCH ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Target branch: $TARGET_BRANCH"
|
echo "Target branch: $TARGET_BRANCH"
|
||||||
sleep 2
|
sleep 1
|
||||||
|
|
||||||
git switch "$MAIN_BRANCH" || exit 1
|
git switch "$MAIN_BRANCH" || exit 1
|
||||||
|
|
||||||
|
|||||||
19
zsh/.omz-custom/scripts/push-main-current.sh
Executable file
19
zsh/.omz-custom/scripts/push-main-current.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
MAIN_BRANCH="main"
|
||||||
|
TARGET_BRANCH=$(git branch --show-current)
|
||||||
|
|
||||||
|
if [ -z $TARGET_BRANCH ]; then
|
||||||
|
echo "Cannot find target branch, are you in a git repo?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $MAIN_BRANCH == $TARGET_BRANCH ]; then
|
||||||
|
echo "You are on main, silly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Target branch: $TARGET_BRANCH"
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
git push origin "$MAIN_BRANCH" "$TARGET_BRANCH"
|
||||||
Reference in New Issue
Block a user