Dotfiles/site-modules/core/files/oh-my-zsh/custom/git.zsh
Ade Attwood 80239af169 refactor(core): start to make dotfiles public
This is the first commit that brings the privet dotfiles to a public
reop previously this was all one puppet module. Now this has been split
out so I can put all of the private files in a private puppet module
2020-09-20 06:22:17 +01:00

22 lines
635 B
Bash

source $ZSH/lib/git.zsh
alias gcon="git diff --name-only --diff-filter=U"
alias gml="git merge --log"
alias gl="git --no-pager log --oneline --reverse --max-count=40"
function git_get_fetch_url() {
git remote show origin -n | awk '/Fetch URL:/{print $3}'
}
function gi() {
curl -sL https://www.gitignore.io/api/$@;
}
function ggpushmr() {
if [[ -z "$1" ]]; then
echo "Error: Target branch to create your merge request against is missing"
exit 1
fi
ggpush -o merge_request.create -o merge_request.target="$1" -o merge_request.merge_when_pipeline_succeeds -o merge_request.remove_source_branch
}