{"thread":{"id":"16864","subject":"a few scenarios before I create my first repo [Scanned]","startedAt":"2008-12-25T23:36:26Z","lastAt":"2008-12-26T06:00:30Z","messageCount":5,"participants":["Conor Rafferty","Junio C Hamano","Zorba","Sitaram Chamarty"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98701","messageId":"BB5F02FD3789B54E8964D38D6775E718242D00@ALTMORE-SVR.altmore.local","threadId":"16864","inReplyTo":null,"subject":"a few scenarios before I create my first repo [Scanned]","fromName":"Conor Rafferty","fromEmail":"conor.rafferty@altmore.co.uk","sentAt":null,"receivedAt":"2008-12-25T23:36:26Z","isPatch":false,"sender":{"key":"conor.rafferty@altmore.co.uk","avatar":null},"body":" Dear All,\n \nApols for the newbie-ness of this post - I couldn't find a seperate\nlist/forum for user support.\n \nI have no SCM for my projects and its becoming a nightmare. Lots of\nfolders lying around, with various versions.\nNeed to manage all this and do the work to catalog and archive the work\ndone so far and set up a good config mgmt framewrok for future work.\nBeen searching for an SCM and git seems good.\n \nBefore I create a repo of live files, I just wanna check:\n \n(1a) \nDo I need to install windows git on the same machine I want to store the\nfiles on ?\nOr can I install git on my workstation PC and create the repo on the\nserver ?\n \n(1b)\nif i create a repo on my office PC, can it easily be moved (including\nall history) to another PC (e.g. LAN server) if we decide to implement\ngit across the team\n(If not, or its inconvenient, I need to create the repo on the server)\n \n(2)\n if i create a repo on my work PC, can it easily be migrated (including\nall history) to a repo on github (etc.) ?\n \n(3) \nif I create a repo and commit the first baseline, can I later create an\nancestor commit to that baseline, if I subsequently find an older\nversion of the project lying around on the file system\n(or, same concept i guess, if i find a project version that sits between\nsay version v1.0 and v1.1 (where v1.0 is the parent tag of v1.1) can i\ninterleave the project files as say v1.01.\n \nI've a feeling the answer's will be YES to 1 & 2 and NO to 3, but the\ndocumentation is too low level for a newb like me.\n \nmany thanks\n \n-- \n\nConor Rafferty BSc (Hons.) \nREGIONAL MANAGER \nAltmore IT Recruitment \nTownsend Enterprise Park \n28 Townsend Street \nBelfast BT13 2ES \n\nT: +44 (0)28 9032 8400 \nE: conor.rafferty@altmore.co.uk  \nW: www.altmore.co.uk \n\nLinkedIn: http://www.linkedin.com/in/conorrafferty\n\n\n------------------------------------------------------------------------\n--------\n\nThis electronic message contains information from Altmore IT Recruitment\nwhich may be privileged or confidential. The information is intended to\nbe for the use of the individual(s) or entity named above. If you are\nnot the intended recipient be aware that any disclosure, copying\ndistribution or use of the contents of this information is prohibited.\nIf you have received this electronic message in error, please notify us\nby telephone or email (to the numbers or address above) immediately.\n\n\n \n"},{"id":"98703","messageId":"7vabajrcfn.fsf@gitster.siamese.dyndns.org","threadId":"16864","inReplyTo":"BB5F02FD3789B54E8964D38D6775E718242D00@ALTMORE-SVR.altmore.local","subject":"Re: a few scenarios before I create my first repo [Scanned]","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-12-26T00:46:04Z","receivedAt":"2008-12-26T00:46:04Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"What's [scanned]?\n\n\"Conor Rafferty\" <conor.rafferty@altmore.co.uk> writes:\n\n> (1a) Do I need to install windows git on the same machine I want to\n> store the files on ?  Or can I install git on my workstation PC and\n> create the repo on the server ?\n\nThe model employed by git is not \"client working with centralized server\".\nOn whichever machine you want to be recording your changes (aka \"running\n'git commit'\"), you would need to have git installed.\n\n> (1b) if i create a repo on my office PC, can it easily be moved\n> (including all history) to another PC (e.g. LAN server) if we decide to\n> implement git across the team (If not, or its inconvenient, I need to\n> create the repo on the server)\n\ngit is a distributed source code management system.  People often deploy\none (or more, in hierarchical fashion in an advanced set-up) bare server\nrepository for everybody to meet and synchronize.  Each developer has one\nrepository (or more) on his or her own on his or her machines.  Most\nnotably, if you work on your notebook and on your desktop (i.e. two\nmachines), you will have (at least) one repository on each of them [*1*].\n\n> (2) if i create a repo on my work PC, can it easily be migrated\n> (including all history) to a repo on github (etc.) ?\n\nI do not know about github in particular (that's #github question) but in\nprinciple, yes.  Easy exchange of development histories across\nrepositories is the whole point of distributedness.\n\n> (3) if I create a repo and commit the first baseline, can I later create\n> an ancestor commit to that baseline, if I subsequently find an older\n> version of the project lying around on the file system (or, same concept\n> i guess, if i find a project version that sits between say version v1.0\n> and v1.1 (where v1.0 is the parent tag of v1.1) can i interleave the\n> project files as say v1.01.\n\nYou can graft the older ones behind the root commit and filter-branch the\nresult to cast the graft in stone.  You are strongly recommended to do\nthat in one repository first, and have reasonable level of confidence in\nthe result before you publish it to other repositories, as running\nfilter-branch to rewrite the history after people (or yourself) cloned the\nhistory to multiple places would cause trouble to thoese .\n\nFor more details, see the user-manual.  Don't dive into manual pages for\nindividual commands, which are for people who already understood the basic\nconcepts in the user manual.\n\n\n[Footnote]\n\n*1* Maybe we should change our pricing structure to be based on the number\nof repositories, not on the number of users.  Currently we charge $0 per\nuser, but we should change $0 per repository ;-)\n"},{"id":"98705","messageId":"gj1aoj$jas$1@ger.gmane.org","threadId":"16864","inReplyTo":"7vabajrcfn.fsf@gitster.siamese.dyndns.org","subject":"Re: a few scenarios before I create my first repo [Scanned]","fromName":"Zorba","fromEmail":"cr@altmore.co.uk","sentAt":null,"receivedAt":"2008-12-26T00:54:23Z","isPatch":false,"sender":{"key":"cr@altmore.co.uk","avatar":null},"body":"Junio,\n\nI am deeply priveleged that a guy like you would answer my simple Q's, \nespecially in holiday time !\nEspecially as now I've discovered a seperate list for users at \ngman.comp.version-control.git.user - apologies for posting here...\n\n> What's [scanned]?\n\nsorry, its just something Sophos adds to our outgoing email to show its \nvirus checked it\n\n>> (1a) Do I need to install windows git on the same machine I want to\n>> store the files on ?  Or can I install git on my workstation PC and\n>> create the repo on the server ?\n>\n> The model employed by git is not \"client working with centralized server\".\n> On whichever machine you want to be recording your changes (aka \"running\n> 'git commit'\"), you would need to have git installed.\n\nOk, I'll install git on workstation, where I'll be running the bash / gui \nfrom\nbut I'll create the repo on the server (for backup purposes) - so won't need \nto install git there I'm assuming?\n\n >> (1b) if i create a repo on my office PC, can it easily be moved\n>> (including all history) to another PC (e.g. LAN server) if we decide to\n>> implement git across the team (If not, or its inconvenient, I need to\n>> create the repo on the server)\n>\n> git is a distributed source code management system.  People often deploy\n> one (or more, in hierarchical fashion in an advanced set-up) bare server\n> repository for everybody to meet and synchronize.  Each developer has one\n> repository (or more) on his or her own on his or her machines.  Most\n> notably, if you work on your notebook and on your desktop (i.e. two\n> machines), you will have (at least) one repository on each of them [*1*].\n>\n>> (2) if i create a repo on my work PC, can it easily be migrated\n>> (including all history) to a repo on github (etc.) ?\n>\n> I do not know about github in particular (that's #github question) but in\n> principle, yes.  Easy exchange of development histories across\n> repositories is the whole point of distributedness.\n\nsuper!\nI'm sorry distributed SCM was new to me\nlast time I used SCM was 10yrs ago - Visual Sourcesafe, PVCS (grrr), \nclearcase (not bad)\n\n>> (3) if I create a repo and commit the first baseline, can I later create\n>> an ancestor commit to that baseline, if I subsequently find an older\n>> version of the project lying around on the file system (or, same concept\n>> i guess, if i find a project version that sits between say version v1.0\n>> and v1.1 (where v1.0 is the parent tag of v1.1) can i interleave the\n>> project files as say v1.01.\n>\n> You can graft the older ones behind the root commit and filter-branch the\n> result to cast the graft in stone.  You are strongly recommended to do\n> that in one repository first, and have reasonable level of confidence in\n> the result before you publish it to other repositories, as running\n> filter-branch to rewrite the history after people (or yourself) cloned the\n> history to multiple places would cause trouble to thoese .\n\nthat's great, it will allow us to capture the flow of work in our project so \nfar, and amend if some other version turns up !\nYour answers are enough for me to proceed and give git a go.\n\n> For more details, see the user-manual.  Don't dive into manual pages for\n> individual commands, which are for people who already understood the basic\n> concepts in the user manual.\n\nthanks, your overview here has really helped\n\n> [Footnote]\n> *1* Maybe we should change our pricing structure to be based on the number\n> of repositories, not on the number of users.  Currently we charge $0 per\n> user, but we should change $0 per repository ;-)\n\nLOL !\nyou guys are great, thank you on behalf of people like me\n\nHappy Christmas ! \n"},{"id":"98708","messageId":"slrngl8f3i.klo.sitaramc@sitaramc.homelinux.net","threadId":"16864","inReplyTo":"7vabajrcfn.fsf@gitster.siamese.dyndns.org","subject":"Re: a few scenarios before I create my first repo [Scanned]","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2008-12-26T02:07:46Z","receivedAt":"2008-12-26T02:07:46Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On 2008-12-26, Junio C Hamano <gitster@pobox.com> wrote:\n> What's [scanned]?\n>\n> \"Conor Rafferty\" <conor.rafferty@altmore.co.uk> writes:\n\n>> (3) if I create a repo and commit the first baseline, can I later create\n>> an ancestor commit to that baseline, if I subsequently find an older\n>> version of the project lying around on the file system (or, same concept\n>> i guess, if i find a project version that sits between say version v1.0\n>> and v1.1 (where v1.0 is the parent tag of v1.1) can i interleave the\n>> project files as say v1.01.\n>\n> You can graft the older ones behind the root commit and filter-branch the\n> result to cast the graft in stone.  You are strongly recommended to do\n> that in one repository first, and have reasonable level of confidence in\n> the result before you publish it to other repositories, as running\n> filter-branch to rewrite the history after people (or yourself) cloned the\n> history to multiple places would cause trouble to thoese .\n\nConsidering the level of questions that Conor had, I thought\nthe following may be useful:\n\nThe way git works is that each commit is represented by a\nsha-1 hash, which is an immutable 160-bit number that\n\"represents\" that commit.  The hash of the parent commit(s),\nif any, as well as the contents of the current \"tree\" are\ninputs to this hash, so if you create or change a parent,\nthe hash will change.\n\nThe sanctity of these hashes is fundamental to the\ndistributedness of git, so when you do something like that,\nyou're causing problems to any other repos which \"pull\"ed\nfrom you, or which you \"push\"ed to -- they thought your\n\"latest\" commit had, say, hash \"A\", but now hash \"A\" no\nlonger exists in your repo and has been replaced by hash\n\"B\".\n\nI have not (yet) had occasion to use either grafting or\nfilter-branch, but I'm pretty sure someone would have a nice\ntutorial somewhere they can point to...\n"},{"id":"98709","messageId":"slrngl8snu.tap.sitaramc@sitaramc.homelinux.net","threadId":"16864","inReplyTo":"gj1aoj$jas$1@ger.gmane.org","subject":"Re: a few scenarios before I create my first repo [Scanned]","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2008-12-26T06:00:30Z","receivedAt":"2008-12-26T06:00:30Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On 2008-12-26, Zorba <cr@altmore.co.uk> wrote:\n\n> Ok, I'll install git on workstation, where I'll be running the bash / gui \n> from\n> but I'll create the repo on the server (for backup purposes) - so won't need \n> to install git there I'm assuming?\n\nI would certainly go for making that also a git repo instead\nof just a file-based backup server.\n\nThis has has 2 benefits: (1) it allows people to work\ntogether in a more controlled fashion than ad hoc push/pull\nfrom each other (2) being a full-blown git repo, it can\nstore a lot more history, *and* it's faster and uses less\nspace/network bw doing so.\n\nSuch servers usually have a \"bare repository\", meaning\nwhat's inside the \".git\" subdirectory is all there is, and\nthere is nothing actually checked out.\n"}]}