{"thread":{"id":"15881","subject":"concerns about git","startedAt":"2008-10-13T18:12:27Z","lastAt":"2008-10-14T11:25:11Z","messageCount":5,"participants":["deepwinter","Shawn O. Pearce","David Tweed","Brandon","Ciprian Dorin Craciun"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"92956","messageId":"19959918.post@talk.nabble.com","threadId":"15881","inReplyTo":null,"subject":"concerns about git","fromName":"deepwinter","fromEmail":"deepwinter@winterroot.net","sentAt":"2008-10-13T18:12:27Z","receivedAt":"2008-10-13T18:12:27Z","isPatch":false,"sender":{"key":"deepwinter@winterroot.net","avatar":null},"body":"\ni've been looking into using git for some version control and it looks\ngreat.. except for 1 thing that really disturbs me.  why is the .git\nrepository stored within the working copy?  this is seems like a recipe for\naccidental deletion.  if you are an individual using version control lets\nsay for just your own work, there is a lot of security that is gained from\nat least having your repository within a different directory, or better on a\ndifferent partition.  this ensures that accidental deletions or hard drive\ncrashes are less likely to result in loosing the ENTIRE project!  of course,\naccidentally deleting your working copy is stupid, but it does happen.   git\nseems to offer no protection against this kind of mistake for the individual\ncoder.. or is there some way to have git put the actual repository files in\na different directory?  (can't find info on that)\n-- \nView this message in context: http://www.nabble.com/concerns-about-git-tp19959918p19959918.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"92957","messageId":"20081013181941.GT4856@spearce.org","threadId":"15881","inReplyTo":"19959918.post@talk.nabble.com","subject":"Re: concerns about git","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-10-13T18:19:41Z","receivedAt":"2008-10-13T18:19:41Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"deepwinter <deepwinter@winterroot.net> wrote:\n> \n> i've been looking into using git for some version control and it looks\n> great.. except for 1 thing that really disturbs me.  why is the .git\n> repository stored within the working copy?  this is seems like a recipe for\n> accidental deletion.  if you are an individual using version control lets\n> say for just your own work, there is a lot of security that is gained from\n> at least having your repository within a different directory, or better on a\n> different partition.  this ensures that accidental deletions or hard drive\n> crashes are less likely to result in loosing the ENTIRE project!  of course,\n> accidentally deleting your working copy is stupid, but it does happen.   git\n> seems to offer no protection against this kind of mistake for the individual\n> coder.. or is there some way to have git put the actual repository files in\n> a different directory?  (can't find info on that)\n\nBecause every working copy is equal.  They all have a copy of the\nproject's metadata in the .git/ directory.\n\nIf you want a backup, create one with clone and push to it every\nso often, e.g.:\n\n  # one time setup\n  $ git clone --bare . /some/other/drive/project.git\n  $ git remote add backup /some/other/drive/project.git\n\n  # then every once in a while, or from a cron job\n  $ git push --all backup\n\nOf course since Git is distributed you can you use this same approach\nto make backups to other systems.  You can even edit the .git/config\nto give the [remote \"backup\"] section more than one url line, so\nthat \"git push --all backup\" will send updated copies to multiple\nlocations at once.\n\nWho needs a central repository like SVN or CVS when you can have 3\nor 4, on just as many disks, in different buildings, and possibly\ndifferent parts of the world.  Yes, I keep my real work that I care\nabout backed up under different providers, with their data centers\nlocated in different countries.  And of course extra copies locally,\nin case the 'net is down.\n\n-- \nShawn.\n"},{"id":"92958","messageId":"e1dab3980810131140p45c62e5cs690ac190eeacc38e@mail.gmail.com","threadId":"15881","inReplyTo":"20081013181941.GT4856@spearce.org","subject":"Re: concerns about git","fromName":"David Tweed","fromEmail":"david.tweed@gmail.com","sentAt":"2008-10-13T18:40:18Z","receivedAt":"2008-10-13T18:40:18Z","isPatch":false,"sender":{"key":"david.tweed@gmail.com","avatar":null},"body":"On Mon, Oct 13, 2008 at 7:19 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>  # then every once in a while, or from a cron job\n>  $ git push --all backup\n>\n> Of course since Git is distributed you can you use this same approach\n> to make backups to other systems.  You can even edit the .git/config\n> to give the [remote \"backup\"] section more than one url line, so\n> that \"git push --all backup\" will send updated copies to multiple\n> locations at once.\n\nAnother advantage of 'git push'ing to another repository (possibly via\ncron) as backup is that (for technical reasons) git push has to\n'parse' the new changes to your repository in order to push, so it is\nlikely to spot corruption (eg, dying disk) at that time and when you\ncan decide what to do about it. (I have enough backups all over the\nplace that I don't worry about not having a 'copy' of any stuff I care\nabout, but that there'll be some fatal corruption I don't notice\nimmediately that then gets propagated everywhere rendering them\nuseless.)\n\n-- \ncheers, dave tweed__________________________\ndavid.tweed@gmail.com\nRm 124, School of Systems Engineering, University of Reading.\n\"while having code so boring anyone can maintain it, use Python.\" --\nattempted insult seen on slashdot\n"},{"id":"92960","messageId":"82c87da00810131251i52d10170h5c1991e2da0bd208@mail.gmail.com","threadId":"15881","inReplyTo":"e1dab3980810131140p45c62e5cs690ac190eeacc38e@mail.gmail.com","subject":"Re: concerns about git","fromName":"Brandon","fromEmail":"siamesedream01@gmail.com","sentAt":"2008-10-13T19:51:25Z","receivedAt":"2008-10-13T19:51:25Z","isPatch":false,"sender":{"key":"siamesedream01@gmail.com","avatar":null},"body":"You can use \"git config core.worktree <location>\" to create a \".git\"\nfolder that manages a working copy in another location.\n\nI know some of the GUI tools don't support this though so I would only\nuse it if truly necessary  . (For example a using git to manage a\nmapped network drive, it would be faster to keep the \".git\" folder on\nthe local harddrive)\n\nMore documentation here: http://www.kernel.org/pub/software/scm/git/docs/\n\nOn Mon, Oct 13, 2008 at 2:40 PM, David Tweed <david.tweed@gmail.com> wrote:\n> On Mon, Oct 13, 2008 at 7:19 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>>  # then every once in a while, or from a cron job\n>>  $ git push --all backup\n>>\n>> Of course since Git is distributed you can you use this same approach\n>> to make backups to other systems.  You can even edit the .git/config\n>> to give the [remote \"backup\"] section more than one url line, so\n>> that \"git push --all backup\" will send updated copies to multiple\n>> locations at once.\n>\n> Another advantage of 'git push'ing to another repository (possibly via\n> cron) as backup is that (for technical reasons) git push has to\n> 'parse' the new changes to your repository in order to push, so it is\n> likely to spot corruption (eg, dying disk) at that time and when you\n> can decide what to do about it. (I have enough backups all over the\n> place that I don't worry about not having a 'copy' of any stuff I care\n> about, but that there'll be some fatal corruption I don't notice\n> immediately that then gets propagated everywhere rendering them\n> useless.)\n>\n> --\n> cheers, dave tweed__________________________\n> david.tweed@gmail.com\n> Rm 124, School of Systems Engineering, University of Reading.\n> \"while having code so boring anyone can maintain it, use Python.\" --\n> attempted insult seen on slashdot\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"92999","messageId":"8e04b5820810140425j14c1c7efm2346a967ad6a070e@mail.gmail.com","threadId":"15881","inReplyTo":"82c87da00810131251i52d10170h5c1991e2da0bd208@mail.gmail.com","subject":"Re: concerns about git","fromName":"Ciprian Dorin Craciun","fromEmail":"ciprian.craciun@gmail.com","sentAt":"2008-10-14T11:25:11Z","receivedAt":"2008-10-14T11:25:11Z","isPatch":false,"sender":{"key":"ciprian.craciun@gmail.com","avatar":"https://gravatar.com/avatar/9685eb13288a2c28bdde10acdcda9f15d495efad7b12bf49e3525eb7b8acf944?d=mp&s=160"},"body":"On Mon, Oct 13, 2008 at 10:51 PM, Brandon <siamesedream01@gmail.com> wrote:\n> You can use \"git config core.worktree <location>\" to create a \".git\"\n> folder that manages a working copy in another location.\n>\n> I know some of the GUI tools don't support this though so I would only\n> use it if truly necessary  . (For example a using git to manage a\n> mapped network drive, it would be faster to keep the \".git\" folder on\n> the local harddrive)\n>\n> More documentation here: http://www.kernel.org/pub/software/scm/git/docs/\n>\n> On Mon, Oct 13, 2008 at 2:40 PM, David Tweed <david.tweed@gmail.com> wrote:\n>> On Mon, Oct 13, 2008 at 7:19 PM, Shawn O. Pearce <spearce@spearce.org> wrote:\n>>>  # then every once in a while, or from a cron job\n>>>  $ git push --all backup\n>>>\n>>> Of course since Git is distributed you can you use this same approach\n>>> to make backups to other systems.  You can even edit the .git/config\n>>> to give the [remote \"backup\"] section more than one url line, so\n>>> that \"git push --all backup\" will send updated copies to multiple\n>>> locations at once.\n>>\n>> Another advantage of 'git push'ing to another repository (possibly via\n>> cron) as backup is that (for technical reasons) git push has to\n>> 'parse' the new changes to your repository in order to push, so it is\n>> likely to spot corruption (eg, dying disk) at that time and when you\n>> can decide what to do about it. (I have enough backups all over the\n>> place that I don't worry about not having a 'copy' of any stuff I care\n>> about, but that there'll be some fatal corruption I don't notice\n>> immediately that then gets propagated everywhere rendering them\n>> useless.)\n>>\n>> --\n>> cheers, dave tweed__________________________\n>> david.tweed@gmail.com\n\n    I have the same problem as David, but I manage it by using a\nsymlink. That is my .git folder is a symlink to the real repository\n(possibly on another partition). (So far I had no problems with this\nsetup.)\n\n    Ciprian Dorin Craciun.\n"}]}