that’s because — (two dashes) get replaced by a – (long dash)
qa
Hi what if i want all these in my application..i want to display the same[git last commit,git url etc] in my “About my project page” which i have done in rails
Hi, you can drop git-info (as executable) at your ‘git-core’ directory and then you can just execute ‘git info’ inside your repository, no need for the alias in your shell. This also means that ‘git info’ would be available for all the users in your system.
In Slackware ‘git-core’ directory is /usr/libexec/git-core/.
Thanks for that.
‘was hoping git would have something better than “cat .git/config” but no 😀
Nice little script anyway
No problem ^^
Cool, I like this 🙂
Nice to know =)
Thank you!
Daniel
You’re welcome Daniel. Nice avatar haha
Thanks dude.
You are welcome. Hope it was helpful.
the git log line did not work with my version, 1.7.6.1. I replaced it with
git –no-pager log –pretty=format:’%h was %an, %ar: %s’ –graph ‑n 10
which now gives nice compact output of the last 10 commits, such as
* 0f4acd3 was Michael, 2 months ago: Merge branch ‘master’ of http://github.com/mxcl/homebrew
|\
| * b769471 was Adam Vandenberg, 2 months ago: uwsgi: remove verbose warning
| * 0228551 was Peter Hollows, 4 months ago: polipo: launchd plist
| * 6d32041 was Jonas Bengtsson, 4 months ago: elinks: enable 256 colors
Thanks Michael.
that’s because — (two dashes) get replaced by a – (long dash)
Hi what if i want all these in my application..i want to display the same[git last commit,git url etc] in my “About my project page” which i have done in rails
You don’t like cat .git/config ?? Try this:
$ git-config -l ; # aka git-config --list
Awesome… I have used the patch from Michael… thanks!
I’ve done something similar but edited my .gitconfig directly w/ suggestions here: http://j.mp/OYAoQB (Stackoverflow post)
cool script. this command is a bit bogus: git —no-pager log —max-count=1
it should be git log –max-count=1
Hi, you can drop git-info (as executable) at your ‘git-core’ directory and then you can just execute ‘git info’ inside your repository, no need for the alias in your shell. This also means that ‘git info’ would be available for all the users in your system.
In Slackware ‘git-core’ directory is /usr/libexec/git-core/.
- Cheers
Thanks for that tip Antonio.