From 0a965c5c3a60530de55d0b21f6417e25718761b8 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Mon, 1 Aug 2022 09:47:25 +0200 Subject: [PATCH] add optional local git helpers --- .gitlocal | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .gitlocal diff --git a/.gitlocal b/.gitlocal new file mode 100644 index 0000000..e331dc6 --- /dev/null +++ b/.gitlocal @@ -0,0 +1,19 @@ +[alias] + +# simplified logs +log1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all +log2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all + +# Aliases for a Phabricator inspired workflow +# 1. Create new feature branch +feature = "!f(){ b=$1; git checkout master; git pull; git checkout -b "$b" master; };f" + +# 2. Working with code +wip = !"git add -A; git commit -m '[WIP]'" +squish = !"git add -A; git commit --no-edit --amend" + +# 3. Push to origin +pod = !"git push origin dev" + +# 4. Push to custom remote branch +poc = "!f(){ b=$1; git push origin "$b";};f"