{"thread":{"id":"43404","subject":"Re: how-to \"backup\" a repository","startedAt":"2006-11-06T05:46:11Z","lastAt":"2006-11-06T06:21:19Z","messageCount":5,"participants":["Shawn Pearce","Wink Saville","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"294693","messageId":"454ECC23.6010503@saville.com","threadId":"43404","inReplyTo":null,"subject":"how-to \"backup\" a repository","fromName":"Wink Saville","fromEmail":"wink@saville.com","sentAt":"2006-11-06T05:46:11Z","receivedAt":"2006-11-06T05:46:11Z","isPatch":false,"sender":{"key":"wink@saville.com","avatar":"https://avatars.githubusercontent.com/u/1024284?v=4"},"body":"Hello,\n\nI've been working with git for a little while, but still very\nmuch a neophyte. One thing I'd like to do is be able to backup\nmy work on a server located on my network.\n\nCurrently I have cloned the Linux 2.6 tree on my personal computer\nand have been backing it up by tar'ing the subdirectory with the\ncloned repository and then using scp to copy it to my server.\n\nI suspect there is a better way, probably using git itself:)\n\nHow is the typically handled?\n\nCheers,\n\n"},{"id":"294636","messageId":"20061106055224.GA23126@spearce.org","threadId":"43404","inReplyTo":"454ECC23.6010503@saville.com","subject":"Re: how-to \"backup\" a repository","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-11-06T05:52:25Z","receivedAt":"2006-11-06T05:52:25Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Wink Saville <wink@saville.com> wrote:\n> I've been working with git for a little while, but still very\n> much a neophyte. One thing I'd like to do is be able to backup\n> my work on a server located on my network.\n> \n> Currently I have cloned the Linux 2.6 tree on my personal computer\n> and have been backing it up by tar'ing the subdirectory with the\n> cloned repository and then using scp to copy it to my server.\n> \n> I suspect there is a better way, probably using git itself:)\n> \n> How is the typically handled?\n\nCreate a remote (in .git/remotes) which refers to your backup\nlocation.  Then use 'git push' to push your branch(es) of\ninterest to the backup.\n\n-- \n"},{"id":"298345","messageId":"454ED27F.8060106@saville.com","threadId":"43404","inReplyTo":"20061106055224.GA23126@spearce.org","subject":"Re: how-to \"backup\" a repository","fromName":"Wink Saville","fromEmail":"wink@saville.com","sentAt":"2006-11-06T06:13:19Z","receivedAt":"2006-11-06T06:13:19Z","isPatch":false,"sender":{"key":"wink@saville.com","avatar":"https://avatars.githubusercontent.com/u/1024284?v=4"},"body":"Shawn Pearce wrote:\n> Wink Saville <wink@saville.com> wrote:\n>> I've been working with git for a little while, but still very\n>> much a neophyte. One thing I'd like to do is be able to backup\n>> my work on a server located on my network.\n>>\n>> Currently I have cloned the Linux 2.6 tree on my personal computer\n>> and have been backing it up by tar'ing the subdirectory with the\n>> cloned repository and then using scp to copy it to my server.\n>>\n>> I suspect there is a better way, probably using git itself:)\n>>\n>> How is the typically handled?\n> \n> Create a remote (in .git/remotes) which refers to your backup\n> location.  Then use 'git push' to push your branch(es) of\n> interest to the backup.\n> \n\nShawn,\n\nThis sounds easy enough, but how-to \"create a remote\"?\nI looked in .git/remotes and see origin which contains:\n\nURL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\nPull: refs/heads/master:refs/heads/origin\n\nBut where is the syntax defined?\n\nAlso, how do I setup git on my server so that it becomes a server?\n\nSorry for are naive questions, but looking at my git tree and\nthe Internet didn't turn up any obvious answers. Hopefully you can\npoint to the appropriate documents.\n\nThanks,\n\nWink\n\n"},{"id":"296112","messageId":"20061106061846.GB23126@spearce.org","threadId":"43404","inReplyTo":"454ED27F.8060106@saville.com","subject":"Re: how-to \"backup\" a repository","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-11-06T06:18:46Z","receivedAt":"2006-11-06T06:18:46Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Wink Saville <wink@saville.com> wrote:\n> This sounds easy enough, but how-to \"create a remote\"?\n> I looked in .git/remotes and see origin which contains:\n> \n> URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n> Pull: refs/heads/master:refs/heads/origin\n> \n> But where is the syntax defined?\n\nSee http://www.kernel.org/pub/software/scm/git/docs/git-push.html#URLS\n \n> Also, how do I setup git on my server so that it becomes a server?\n\nSo long as you can ssh to it and Git is installed in your PATH then\nthere's nothing else to do; Git will login via SSH and execute Git\non the remote side to run the server.\n\n-- \n"},{"id":"297633","messageId":"7vfycxf63k.fsf@assigned-by-dhcp.cox.net","threadId":"43404","inReplyTo":"454ED27F.8060106@saville.com","subject":"Re: how-to \"backup\" a repository","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-06T06:21:19Z","receivedAt":"2006-11-06T06:21:19Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Wink Saville <wink@saville.com> writes:\n\n> This sounds easy enough, but how-to \"create a remote\"?\n> I looked in .git/remotes and see origin which contains:\n>\n> URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n> Pull: refs/heads/master:refs/heads/origin\n>\n> But where is the syntax defined?\n\nman git-push -- where else ;-)?\n\nhttp://www.kernel.org/pub/software/scm/git/docs/git-push.html\n\n"}]}