Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there an equivalent to bzr-upload for git?

It should be able to upload the contents of a tree to a remote location over a dumb protocol (e.g. ftp). Future uploads should only upload the changed files. The history/repo need not be uploaded.

share|improve this question

2 Answers 2

You can just copy the directory over, by any means available. The result is a git directory. But it is better to set up a bare repository and work from there (remeber that the git protocol was designed by efficieny freaks worrying about developers over slow links with huge latencies/RTTs). Check out the git book or one of the excellent tutorials listed here.

share|improve this answer
    
No. Git is not installed on the server, and so I can't use the git protocol. –  Gary van der Merwe Feb 5 '13 at 14:03
    
Then the git repository on the other end won't be of any use (except for backup). Use rsync to keep it up to date with your home. –  vonbrand Feb 5 '13 at 14:47
    
I specifically said I don't want the repo uploaded. I want the contents of a tree uploaded. –  Gary van der Merwe Feb 5 '13 at 15:32
    
My cursory reading of bzr-upload is that it uploads the repo... OK, you can create an archive of the repository's data under version control by git archive, it can create several formats. –  vonbrand Feb 5 '13 at 15:35

If you want to push, rather than pull, I don't think Git supports that functionality without a recipient server on the other side.

However, it would be fairly easy to attach an rsync command (or similar) to the commit hooks in your Git repository, or just run the command manually when you want to upload code. If your rsync excludes the .git directories in your repo, all of the history stuff won't be uploaded, and only changed files will be touched.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.