Git shell scripts

3 views
Skip to first unread message

John Smith

unread,
Apr 20, 2010, 4:45:42 AM4/20/10
to From The Hip Group
Hey all,

Thought I'd share these with you since I mentioned I used them at our
meeting. Some are not going to save much time, but some are kinda
useful. Your call. ;-)

These are bash script aliases, for what it's worth.

alias gitrm="git rm --cached"
alias gitr="git ls-files -z --deleted | git update-index -z --remove
--stdin"
alias gita="git add -v ."
alias gitu="gita;gitr;gitc"
alias gitc="git commit"
alias gitp="git push origin master"


gitrm allows you to remove something from git without actually deleting it.

gitr is probably the most crazy one, and what it does it goes through
your files and removes anything that's not in the git directory.
Sometimes you get extra stuff and you just want to delete it all out. I
think of it sort of like an rsync --delete sort of command.

Cheers!

-John

--
You received this message because you are subscribed to the Google Groups "From the Hip" group.
To post to this group, send email to from-t...@googlegroups.com.
To unsubscribe from this group, send email to from-the-hip...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/from-the-hip?hl=en.

Reply all
Reply to author
Forward
0 new messages