## How to make your prompt show your branch:
add this to your .bashrc:
PS1="[...@\h \W\$(git-branch 2> /dev/null | grep -e '\* ' | sed
's/^..\(.*\)/{\1}/')]\$ "
My prompt looks like:
[mmcc...@gibson rhn{master}]$
[mmcc...@gibson rhn{master}]$ git checkout devel
Switched to branch "devel"
[mmcc...@gibson rhn{devel}]$
## git-ls-files for svn like listing
I occasionally use this to get a list of modified files in a subdir
sorta like SVN does:
alias gitmod='git ls-files --exclude-per-directory=.gitignore
--exclude-from=.git/info/exclude --others --modified -t'
warning, this does not show added files so if you want to use it to
chain with an:
gitmod | xargs git commit -m 'bunch of files'
you will miss those.
## subdir diff
alias gitdiff='git-ls-files --modified | xargs git diff'
Perhaps there are better ways of doing the above....
Mike
--
Mike McCune
mmccune AT redhat.com
Engineering | Portland, OR
RHN Satellite | 650.567.9039x79248
_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel