Created
February 3, 2011 23:06
-
-
Save JoshuaEstes/810419 to your computer and use it in GitHub Desktop.
A co-worker is a GOD of men, I challenged him to use one line a command to take files for a current git project and push those to a remote server. This is what he came up with.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git archive --format=tar HEAD | ssh username@server tar xf - -C /path/to/folder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There needs to be a bit more about what was going on. We use gitolite to manage our repos and our staging server has many users that can ssh into. Instead of giving the staging server read only access to all the repos, this was what we came up with. It may or may not be the best solution, but it's a neat little trick that you can use and thought others may find it useful or may know of a better way.