
I recently needed to be able to run a regular git task on a folder and I didn't want to have to CD into that folder first. Annoyingly, there didn't seem to be an optional "path" parameter to git remote update, until I looked at the help file for Git.
It's quite simple! All you need to do, to run a git command on an arbitrary path, is this:
$ git --git-dir=/path/to/the/repository remote update
This makes assigning, say, a cron job to regularly update repository which is being used by a tool such as GitList, very easy indeed!












2 Comments
That is a really cool update.
That is a really cool update. You can also give permissions to folder as well. that's great.
cool site
cool site
Add new comment