From cef30030bef011b506a568b5a1bd46b99ead72c0 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 23 Jan 2022 12:29:00 +0800 Subject: Add function and alias to help code review Add following aliases: - gmf: Show the changed files from base branch to current branch - gmfn: Similar to gmfn, but only contains the name of changed files Add a function: - greview: Open all changed files in vim. Map gd to show the diff between base branch and current branch. --- .aliases | 3 +++ 1 file changed, 3 insertions(+) (limited to '.aliases') diff --git a/.aliases b/.aliases index d629f13..ff04e6b 100644 --- a/.aliases +++ b/.aliases @@ -7,6 +7,9 @@ alias nb='cd ~/journals; vim index.md; cd -' alias todo='cd ~/journals; vim gtd.md; cd -' alias vimg='vim +Git +only' +alias gmf='git diff --merge-base' +alias gmfn='git diff --merge-base --name-only' + if [ -f /usr/bin/pacman ]; then alias S='pacman -S' alias Si='pacman -Si' -- cgit v1.2.3