mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00
git inf
This commit is contained in:
parent
4305facb80
commit
c0851b91a3
3 changed files with 37 additions and 0 deletions
35
git-info
Executable file
35
git-info
Executable 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."
|
|
@ -23,6 +23,7 @@
|
||||||
ls = show
|
ls = show
|
||||||
|
|
||||||
untrack-ignored = !git-untracked-ignored
|
untrack-ignored = !git-untracked-ignored
|
||||||
|
info = !git-info
|
||||||
amend = commit --amend -C HEAD
|
amend = commit --amend -C HEAD
|
||||||
[color]
|
[color]
|
||||||
diff = auto
|
diff = auto
|
||||||
|
|
|
@ -81,6 +81,7 @@ my %links = (
|
||||||
caffeinate => 'bin/caffeinate',
|
caffeinate => 'bin/caffeinate',
|
||||||
lock => 'bin/lock',
|
lock => 'bin/lock',
|
||||||
|
|
||||||
|
'git-info' => 'bin/git-info',
|
||||||
'git-untrack-ignored' => 'bin/git-untracked-ignored',
|
'git-untrack-ignored' => 'bin/git-untracked-ignored',
|
||||||
|
|
||||||
gdbinit => '.gdbinit',
|
gdbinit => '.gdbinit',
|
||||||
|
|
Loading…
Add table
Reference in a new issue