Articles about git

Git Logo

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:

Druplicon Git Logo

Have you ever needed or wanted to pull a remote Git Repository on down as a zip or tarball? You know, the way Github does? Most project releases have fairly recently built tarballs which is awesome - but Sandboxes do not (so it seems - please correct me if I'm wrong!).

The following snippet lets you "archive" a remote repository, pull it down as a tarball, and extract it in-place:

git archive --format=tar --prefix=PROJECT/ BRANCH | tar -xf -
Subscribe to Articles about git