Run simple git operations (diff/log/add/commit/...) from outside the working directory.
Run git commands as if you were inside the working directory. This is useful when you want to avoid changing directory all the time when working with multiple repositories.
cd /tmp
rgit diff /home/d5ve/checkout1
rgit add /home/d5ve/checkout1/*.pl
rgit commit /home/d5ve/checkout1/
rgit examines the commandline arguments, and tries to work out the GIT_WORK_TREE and GIT_DIR environmental variables from any file paths.
Current version 0.05 - 2021-06-23
Now works for bare repositories.
0.04 - 2011-03-02
Now filters out obvious flags and comments from directory tests.
Now works when passed a commit message on the commandline.
Version 0.02 - 2010-09-02
Now with some POD.
Simply copy the rgit script to a directory in your $PATH.
This module requires these other modules and libraries:
File::Spec
File::Basename
rgit is free software. It comes without any warranty, to the extent permitted by applicable law.
rgit is released under the WTFPL Version 2.0 licence - http://sam.zoy.org/wtfpl/COPYING