Created
January 20, 2012 10:00
-
-
Save nikreiman/1646513 to your computer and use it in GitHub Desktop.
My git merging flow: fetch, incoming, review, merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show incoming commits on the current branch that have yet to be merged. | |
# This function should be run directly after fetching. | |
function incoming() { | |
local branch=$1 | |
if [ -z "$branch" ] ; then | |
branch=$(git-branch-current) | |
fi | |
git --no-pager log origin/$branch ^$branch | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple code review for incoming changes. After fetching, run this function | |
# to walk through each change, newest to oldest. | |
function review() { | |
local branch=$(git-branch-current) | |
local response= | |
for i in $(git --no-pager log --format="%h" origin/$branch ^$branch) ; do | |
clear | |
git show $i | |
read -p "Press any key to continue " response | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment