I have a bash script, called cgit, that acts as git for one specific git repo (located at /.git
):
#!/bin/bash
cd /;
sudo git $@ > /dev/stdout
I use it to keep track of imporant system files:
cgit add /etc/rc.conf
The trouble is when I try to add content relative to the directory I'm in, for example:
cd /home/user
cgit add .ssh/config
cgit would try and add /.ssh/config
to the /.git
repo.
Any suggestions or work-arounds?