From 7494421ec6281de1ee7d327601223537b325a7a1 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Sun, 20 Sep 2020 17:37:48 +0500 Subject: Updates. --- files/.gitconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'files/.gitconfig') diff --git a/files/.gitconfig b/files/.gitconfig index c26d10a..b2d308a 100644 --- a/files/.gitconfig +++ b/files/.gitconfig @@ -53,6 +53,11 @@ whoami = config user.email fugitive = mergetool --tool fugitive clean-branches = !sh -c 'git branch --merged | grep -v '^*' | fzf -m | xargs -rp git branch -d' + + # Gitlab merge requests helpers + mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - + mr-clean = "!git for-each-ref refs/heads/mr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done" + [advice] statusHints = false detachedHead = false @@ -99,3 +104,8 @@ cmd = vim -c \"Gdiff\" \"$MERGED\" [fetch] prune = true + +# Allow pushing changes when working with a "read-only" remote from GitHub. +[url "git@github.com:"] + pushInsteadOf = https://github.com/ + pushInsteadOf = git://github.com/ -- cgit v1.2.3