{"thread":{"id":"32422","subject":"Noob Question","startedAt":"2012-12-21T01:07:53Z","lastAt":"2012-12-21T22:38:41Z","messageCount":4,"participants":["awingnut","Andrew Ardill","W T Riker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"205303","messageId":"50D3B669.1030204@hotmail.com","threadId":"32422","inReplyTo":null,"subject":"Noob Question","fromName":"awingnut","fromEmail":"wtriker.ffe@gmail.com","sentAt":"2012-12-21T01:07:53Z","receivedAt":"2012-12-21T01:07:53Z","isPatch":false,"sender":{"key":"wtriker.ffe@gmail.com","avatar":null},"body":"I have not used git yet but am planning to. I am trying to get my head\naround how it will work and the documentation I found so far is of\nmodest help. I currently have a Java application developed using Eclipse\non Windows. However, the project is located on a Linux shared drive\nwhich is my Eclipse workspace. I do my builds using ANT on the Linux\nhost. My main questions center around the git repository and accessing it.\n\n1) Should I install git on Linux or Windows or does it matter?\n2) How will my build scripts access the source? Will it be the same as\nnow (my scripts 'cd' to the Eclipse project directory and run there) or\ndo I need to add a wrapper to my script to check out the entire source\nfor the builds?\n3) How do I move my current Eclipse project into git after I create the\nempty repository? I can only find info on how to import git into Eclipse\nnot the other way around.\n4) Do I need to checkout the entire project from Eclipse to modify and\ntest it or only the classes I want to change? Does the plugin get the\nothers as needed when I run the app within Eclipse for testing?\n\nThanks for any help understanding how I need to configure all this.\n"},{"id":"205305","messageId":"CAH5451kq8XwPTez0Jhst+rVCo=EteW7OMH4wr2a1rCXTW_f0jQ@mail.gmail.com","threadId":"32422","inReplyTo":"50D3B669.1030204@hotmail.com","subject":"Re: Noob Question","fromName":"Andrew Ardill","fromEmail":"andrew.ardill@gmail.com","sentAt":"2012-12-21T01:43:04Z","receivedAt":"2012-12-21T01:43:04Z","isPatch":false,"sender":{"key":"andrew.ardill@gmail.com","avatar":"https://gravatar.com/avatar/da14cb7c091dd44dc6c63a4d3361b149acaf25226dc78eb4131a17b93d9b0993?d=mp&s=160"},"body":"Hi!\n\nOn 21 December 2012 12:07, awingnut <wtriker.ffe@gmail.com> wrote:\n> My main questions center around the git repository and accessing it.\n\nThe main thing you need to know is that you can work on your code base\nin the *exact* same way while using git. You don't *have* to change\nanything about how you work, as git's primary purpose is to store\nsnapshots of your work so that you have a history of what has changed.\n\nThat being said, you can (and maybe should) change how you work to\ntake into account the power of git. Most of what you do will stay the\nsame, however.\n\n> 1) Should I install git on Linux or Windows or does it matter?\n\nInstall git wherever you need to access the code. From the sounds of\nit you will want git on both machines, as you are working on windows\nand but keeping the code on the linux shared drive. When working on\nthe windows machine you will use a windows copy of git to manipulate\nthe workspace, though I'm not sure if there are any gotchas with the\ninteraction with a linux shared drive.\n\nIf you want to manipulate the repository from the linux machine you\nwill need git on it as well.\n\nUnless you're using a git server, manipulating the repository is a\nlocal action and so is performed by the client. That is, when working\non windows use the windows client, if you also work on the linux\nmachine then you will need a client there as well.\n\n> 2) How will my build scripts access the source? Will it be the same as\n> now (my scripts 'cd' to the Eclipse project directory and run there) or\n> do I need to add a wrapper to my script to check out the entire source\n> for the builds?\n\nIt's the same as now. Git uses the concept of a 'work tree' to talk\nabout the actual files you are working on now. The work tree\ncorresponds exactly to your current project files. When you create a\ngit repository you gain the ability to store snapshots of this working\ntree into the 'object store', as well as metadata about the snapshots,\nso that you can restore that snapshot later.\n\nYour actual files keep their current layout and format, until you change them.\n\n> 3) How do I move my current Eclipse project into git after I create the\n> empty repository? I can only find info on how to import git into Eclipse\n> not the other way around.\n\nYou have two options. Create the git repository in the same location\nas your Eclipse project. Navigate to the project folder using git bash\nand do a 'git init' inside it; voila! you now have a git repository.\nYou can choose to create a 'remote' repository somewhere to store a\nbackup of your code as well, but this _still_ requires you to init a\nlocal repository to backup.\n\nThe other option is to create a blank repository somewhere (anywhere)\nand then tell that repository to use your Eclipse project as its\nworking tree. The benefit to doing this is being able to keep your\nsnapshots and metadata in a different location to your working\ndirectory (say keep the snapshots on a local windows drive while your\nworking directory is on the linux share). Unless you shouldn't or\naren't able to create the repository within the Eclipse project, I\nwould recommend against this.\n\n> 4) Do I need to checkout the entire project from Eclipse to modify and\n> test it or only the classes I want to change? Does the plugin get the\n> others as needed when I run the app within Eclipse for testing?\n\nNot sure exactly what you are asking here, but in general people will\n'clone' an entire repository including all its history. If you want to\nupdate only certain files that is fine, but the commit object stores\nthe state of the entire tree of files. Note that a commit object does\n_not_ store the difference between two snapshots, but stores the\nentire state of the files. You can grab a file from a given snapshot\nand test that along side files from a second snapshot, but if you\nwanted to commit the resulting tree to the repository it would store a\nthird snapshot containing the exact state of all files.\n\nHopefully that clears it up for you?\n\nRegards,\n\nAndrew Ardill\n"},{"id":"205333","messageId":"50D463C4.6030208@gmail.com","threadId":"32422","inReplyTo":"CAH5451kq8XwPTez0Jhst+rVCo=EteW7OMH4wr2a1rCXTW_f0jQ@mail.gmail.com","subject":"Re: Noob Question","fromName":"W T Riker","fromEmail":"wtriker.ffe@gmail.com","sentAt":"2012-12-21T13:27:32Z","receivedAt":"2012-12-21T13:27:32Z","isPatch":false,"sender":{"key":"wtriker.ffe@gmail.com","avatar":null},"body":"Hi Andrew,\n\nThank you for a great explanation. It clears up a number of things but\nalso creates some new questions. However, armed with this I am going to\nrun through the documentation again and perhaps it will make more sense\nto me. One basic question, since I don't make changes from the Linux\nside, only builds, do I need to install anything git related on that\nmachine?\n\nOn 12/20/2012 8:43 PM, Andrew Ardill wrote:\n> Hi!\n>\n> On 21 December 2012 12:07, awingnut <wtriker.ffe@gmail.com> wrote:\n>> My main questions center around the git repository and accessing it.\n> The main thing you need to know is that you can work on your code base\n> in the *exact* same way while using git. You don't *have* to change\n> anything about how you work, as git's primary purpose is to store\n> snapshots of your work so that you have a history of what has changed.\n>\n> That being said, you can (and maybe should) change how you work to\n> take into account the power of git. Most of what you do will stay the\n> same, however.\n>\n>> 1) Should I install git on Linux or Windows or does it matter?\n> Install git wherever you need to access the code. From the sounds of\n> it you will want git on both machines, as you are working on windows\n> and but keeping the code on the linux shared drive. When working on\n> the windows machine you will use a windows copy of git to manipulate\n> the workspace, though I'm not sure if there are any gotchas with the\n> interaction with a linux shared drive.\n>\n> If you want to manipulate the repository from the linux machine you\n> will need git on it as well.\n>\n> Unless you're using a git server, manipulating the repository is a\n> local action and so is performed by the client. That is, when working\n> on windows use the windows client, if you also work on the linux\n> machine then you will need a client there as well.\n>\n>> 2) How will my build scripts access the source? Will it be the same as\n>> now (my scripts 'cd' to the Eclipse project directory and run there) or\n>> do I need to add a wrapper to my script to check out the entire source\n>> for the builds?\n> It's the same as now. Git uses the concept of a 'work tree' to talk\n> about the actual files you are working on now. The work tree\n> corresponds exactly to your current project files. When you create a\n> git repository you gain the ability to store snapshots of this working\n> tree into the 'object store', as well as metadata about the snapshots,\n> so that you can restore that snapshot later.\n>\n> Your actual files keep their current layout and format, until you change them.\n>\n>> 3) How do I move my current Eclipse project into git after I create the\n>> empty repository? I can only find info on how to import git into Eclipse\n>> not the other way around.\n> You have two options. Create the git repository in the same location\n> as your Eclipse project. Navigate to the project folder using git bash\n> and do a 'git init' inside it; voila! you now have a git repository.\n> You can choose to create a 'remote' repository somewhere to store a\n> backup of your code as well, but this _still_ requires you to init a\n> local repository to backup.\n>\n> The other option is to create a blank repository somewhere (anywhere)\n> and then tell that repository to use your Eclipse project as its\n> working tree. The benefit to doing this is being able to keep your\n> snapshots and metadata in a different location to your working\n> directory (say keep the snapshots on a local windows drive while your\n> working directory is on the linux share). Unless you shouldn't or\n> aren't able to create the repository within the Eclipse project, I\n> would recommend against this.\n>\n>> 4) Do I need to checkout the entire project from Eclipse to modify and\n>> test it or only the classes I want to change? Does the plugin get the\n>> others as needed when I run the app within Eclipse for testing?\n> Not sure exactly what you are asking here, but in general people will\n> 'clone' an entire repository including all its history. If you want to\n> update only certain files that is fine, but the commit object stores\n> the state of the entire tree of files. Note that a commit object does\n> _not_ store the difference between two snapshots, but stores the\n> entire state of the files. You can grab a file from a given snapshot\n> and test that along side files from a second snapshot, but if you\n> wanted to commit the resulting tree to the repository it would store a\n> third snapshot containing the exact state of all files.\n>\n> Hopefully that clears it up for you?\n>\n> Regards,\n>\n> Andrew Ardill\n>\n"},{"id":"205380","messageId":"CAH5451mZdwf-2d+XJTaLLhY0FjbpJTfCkzExw23FojQE08FHZw@mail.gmail.com","threadId":"32422","inReplyTo":"50D463C4.6030208@gmail.com","subject":"Re: Noob Question","fromName":"Andrew Ardill","fromEmail":"andrew.ardill@gmail.com","sentAt":"2012-12-21T22:38:41Z","receivedAt":"2012-12-21T22:38:41Z","isPatch":false,"sender":{"key":"andrew.ardill@gmail.com","avatar":"https://gravatar.com/avatar/da14cb7c091dd44dc6c63a4d3361b149acaf25226dc78eb4131a17b93d9b0993?d=mp&s=160"},"body":"On 22 December 2012 00:27, W T Riker <wtriker.ffe@gmail.com> wrote:\n> One basic question, since I don't make changes from the Linux\n> side, only builds, do I need to install anything git related on that\n> machine?\n\nYou don't need to install it, but there is no harm in it. If you ever\nstart doing a build from the linux box and decide you have the wrong\nversion of your code, it would be useful to have git installed so you\ncan checkout the right version. Installing git is quick and painless,\nhowever, so you can cross that bridge once you get to it.\n\nRegards,\n\nAndrew Ardill\n"}]}