This commit is contained in:
David Majnemer 2010-09-02 11:33:04 -05:00
parent 4305facb80
commit c0851b91a3
3 changed files with 37 additions and 0 deletions

35
git-info Executable file
View file

@ -0,0 +1,35 @@
#! /bin/sh
# based on a script by Duane Johnson with some simplifications
CDPATH=`git rev-parse --show-cdup`
# not a valid git repo? leave
if [ $? -ne 0 ] ; then
exit
fi
# switch to the directory holding .git
if [ -n "${CDPATH}" ] ; then
cd "${CDPATH}"
fi
# Show various information about this git directory
echo "== Remote URL: `git remote -v`"
echo "== Remote Branches: "
git branch -r
echo
echo "== Local Branches:"
git branch
echo
echo "== Configuration (.git/config)"
cat .git/config
echo
echo "== Most Recent Commit"
git --no-pager log --max-count=1
echo
echo "Type 'git log' for more commits, or 'git show' for full commit details."

View file

@ -23,6 +23,7 @@
ls = show
untrack-ignored = !git-untracked-ignored
info = !git-info
amend = commit --amend -C HEAD
[color]
diff = auto

View file

@ -81,6 +81,7 @@ my %links = (
caffeinate => 'bin/caffeinate',
lock => 'bin/lock',
'git-info' => 'bin/git-info',
'git-untrack-ignored' => 'bin/git-untracked-ignored',
gdbinit => '.gdbinit',