Git Info (kinda like ’svn info’)
Author: Duane Johnson
12
Jun
git-info
I really like subversion’s “svn info” command, but git doesn’t have one. So I looked some things up, and made the following script:
git-info.txt
The output looks like this:
== Remote URL: origin git@github.com:canadaduane/my-project.git
== Remote Branches:
origin/work
trunk
trunk@1309
trunk@2570
trunk@8
== Local Branches:
master
* work
== Configuration (.git/config)
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[svn-remote "svn"]
url = svn+ssh://svn.my-project.com/srv/svn
fetch = my-project/trunk:refs/remotes/trunk
[remote "origin"]
url = git@github.com:canadaduane/my-project.git
fetch = refs/heads/*:refs/remotes/origin/*
[github]
user = canadaduane
repo = my-project
== Most Recent Commit
commit b47dce8b4102faf1cedc8aa3554cb58d76e0cbc1
Author: Duane Johnson <duane.johnson@gmail.com>
Date: Wed Jun 11 17:00:33 2008 -0600
Added changes to database schema that will allow decentralization from content pointers table
type 'git log' for more, or 'git show' for full commit details.
Git Tab Completion
I found out about tab completion for git this morning. Very nice, especially for those of us who are just getting used to git commands.
Filed under: Uncategorized
2 Responses for "Git Info (kinda like ’svn info’)"
Very handy indeed. I had a git-info alias that would just cat out the .git/config file, but this script is more informative and helpful. I’ve duly ripped it off and it is sitting in my ~/bin.
Thanks for sharing.
Thanks, Ben. I’m glad you’re finding it useful!
Leave a reply