{"thread":{"id":"28899","subject":"RE: Updating Files","startedAt":"2011-11-10T00:54:34Z","lastAt":"2011-11-10T01:08:04Z","messageCount":3,"participants":["Brand, Greg","Andrew Ardill","Ben Walton"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"179229","messageId":"338A71EC3E356A47BF5279971E4EF72A04D860D7F6@WESMSG51.nordsoncorp.local","threadId":"28899","inReplyTo":null,"subject":"RE: Updating Files","fromName":"Brand, Greg","fromEmail":"greg.brand@nordsonasymtek.com","sentAt":"2011-11-10T00:54:34Z","receivedAt":"2011-11-10T00:54:34Z","isPatch":false,"sender":{"key":"greg.brand@nordsonasymtek.com","avatar":null},"body":"Good Day,\n\nLet me begin by describing my SCM experience.\nI am an old school UNIX guy, and grew up with RCS.\nI have written many BASH and CSH scripts for RCS.\n\nMoving on, the next logical step was CVS.\nI've worked with (and administered) CVS for the last 12 years.\nI have also worked with SourceSafe (ugh), Perforce and ClearCase.\n\nI am an avid CVS proponent.\n\nI have Recently changed jobs, to a SourceSafe shop.\nWe HAVE to move to something different.\n\nI've played with both Subversion and GIT.\nI REALLY like GIT, but have some questions.\n\n\nFor my questions, I will use a CVS comparison sense this is what I'm most familiar with.\n\n- Updating a File: \n   ~ CVS's default behavior, is to try to merge changes from the repository into my local copy. Sometimes, this isn't desirable. \n   ~ With CVS I can also choose to get a \"clean\" copy. If the file I'm updating has been modified, CVS will create a backup of the original file before updating to the clean version. The backup file is saved as a \"hidden\" file, with the format:\n               .<filename>.revision\n   ~ Does GIT have the same, or similar options???  I understand with the distributed nature of GIT, there may be several ways to accomplish this. It is nice, though, to be able to get a clean version without losing changes you may (or may not) want to keep.\n\n\nThank you for your help.\nI am sure I will have more questions.\n\nBest Regards,\nGreg Brand\n\n\n_____________________________________________________________________________\nScanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com\n\nThis email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law.  If you are not the intended recipient you are hereby notified that any dissemination, copying or distribution of the email or its contents is strictly prohibited.  If you have received this message in error, please notify us immediately, by replying to the message and deleting it from your computer.\n\nWARNING: Internet communications are not assured to be secure or clear of inaccuracies as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.  Therefore, we do not accept responsibility for any errors or omissions that are present in this email, or any attachment, that have arisen as a result of e-mail transmission.\n_____________________________________________________________________________\n"},{"id":"179230","messageId":"CAH5451m=zdM_1CKSubLksm+YZxjybNFo-=q6HTUkXXTsqzae9g@mail.gmail.com","threadId":"28899","inReplyTo":"338A71EC3E356A47BF5279971E4EF72A04D860D7F6@WESMSG51.nordsoncorp.local","subject":"Re: Updating Files","fromName":"Andrew Ardill","fromEmail":"andrew.ardill@gmail.com","sentAt":"2011-11-10T01:05:15Z","receivedAt":"2011-11-10T01:05:15Z","isPatch":false,"sender":{"key":"andrew.ardill@gmail.com","avatar":"https://gravatar.com/avatar/da14cb7c091dd44dc6c63a4d3361b149acaf25226dc78eb4131a17b93d9b0993?d=mp&s=160"},"body":"An oft heard recommendation when taking up git is to disregard any SCM\nyou might already know, to clear your mind from an pre-existing\nexpectations and to learn the tool with a blank slate, so to speak.\nThis is probably a good idea in your case.\n\nA solid understanding of the core concepts git uses will really help\nyou - for example, it is very quick and easy to create branches in\ngit. A branch is just a reference to a snapshot of your files. So, you\ncan of course have a 'clean' copy and 'dirty' copy, but they would be\ncontained in different branches, not different files. Once you have\ntwo branches you can easily compare them, merge them, steal from them\n- whatever you want.\n\nOther key ideas you may want to understand (in the blank slate sense)\ninclude the index, the working directory and staging commits. I'm sure\nothers have their own ideas about what they key ideas are too.\n\nIf you haven't already, check out the pro-git book[1], it is very good\nat explaining these things.\n\nRegards,\n\nAndrew Ardill\n\n[1] http://progit.org/book/\n\n\n\nOn 10 November 2011 11:54, Brand, Greg <greg.brand@nordsonasymtek.com> wrote:\n> Good Day,\n>\n> Let me begin by describing my SCM experience.\n> I am an old school UNIX guy, and grew up with RCS.\n> I have written many BASH and CSH scripts for RCS.\n>\n> Moving on, the next logical step was CVS.\n> I've worked with (and administered) CVS for the last 12 years.\n> I have also worked with SourceSafe (ugh), Perforce and ClearCase.\n>\n> I am an avid CVS proponent.\n>\n> I have Recently changed jobs, to a SourceSafe shop.\n> We HAVE to move to something different.\n>\n> I've played with both Subversion and GIT.\n> I REALLY like GIT, but have some questions.\n>\n>\n> For my questions, I will use a CVS comparison sense this is what I'm most familiar with.\n>\n> - Updating a File:\n>    ~ CVS's default behavior, is to try to merge changes from the repository into my local copy. Sometimes, this isn't desirable.\n>    ~ With CVS I can also choose to get a \"clean\" copy. If the file I'm updating has been modified, CVS will create a backup of the original file before updating to the clean version. The backup file is saved as a \"hidden\" file, with the format:\n>                .<filename>.revision\n>    ~ Does GIT have the same, or similar options???  I understand with the distributed nature of GIT, there may be several ways to accomplish this. It is nice, though, to be able to get a clean version without losing changes you may (or may not) want to keep.\n>\n>\n> Thank you for your help.\n> I am sure I will have more questions.\n>\n> Best Regards,\n> Greg Brand\n>\n>\n> _____________________________________________________________________________\n> Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com\n>\n> This email is intended only for the use of the party to which it is addressed and may contain information that is privileged, confidential, or protected by law.  If you are not the intended recipient you are hereby notified that any dissemination, copying or distribution of the email or its contents is strictly prohibited.  If you have received this message in error, please notify us immediately, by replying to the message and deleting it from your computer.\n>\n> WARNING: Internet communications are not assured to be secure or clear of inaccuracies as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.  Therefore, we do not accept responsibility for any errors or omissions that are present in this email, or any attachment, that have arisen as a result of e-mail transmission.\n> _____________________________________________________________________________\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":"179231","messageId":"1320887258-sup-7544@pinkfloyd.chass.utoronto.ca","threadId":"28899","inReplyTo":"338A71EC3E356A47BF5279971E4EF72A04D860D7F6@WESMSG51.nordsoncorp.local","subject":"RE: Updating Files","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-11-10T01:08:04Z","receivedAt":"2011-11-10T01:08:04Z","isPatch":false,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Excerpts from Brand, Greg's message of Wed Nov 09 19:54:34 -0500 2011:\n\nHi Greg,\n\n> Â Â Â Â Â Â Â Â Â Â Â Â Â Â  .<filename>.revision Â Â  ~ Does GIT have the same, or\n> similar options???Â  I understand with the distributed nature of GIT,\n> there may be several ways to accomplish this. It is nice, though, to\n> be able to get a clean version without losing changes you may (or\n> may not) want to keep.\n\nYou've got at least two options to store changes you want to keep but\nhave them kept out of the way.\n\n1. Commit the change on a branch and leave that branch sitting there.\n2. Stash the change with a descriptive note.\n\nIf you're on branch master and want to save this change but not have\nit 'live' you could do:\n\ngit checkout -b save_my_change\ngit add modified_file\ngit commit -m 'saving this for later, just in case'\ngit checkout master\n\nThe master branch will not have the change but the save_my_change\nbranch will.  You can see the commit with a command like:\n\ngit show save_my_change\n\nThat looks up the sha1 for the ref that save_my_change refers to and\nthen shows the commit object.  To re-apply this later, you could merge\nthe branch to master or cherry pick the sha1 to master (or any other\nbranch).\n\nThe second option, stashing, is likely nicer for this type of thing\nbut ymmv.  In your working tree, with the modified file(s), do:\n\ngit stash save -m 'something potentially useful, but maybe not'\n\nYour working tree is now clean and you can see stashes with:\n\ngit stash list\n\nYou can later get at a stash with git stash apply.\n\n\nThe real gurus may point out something nicer that I didn't think of\ntoo...\n\nHope this helps.\n\nThanks\n-Ben\n--\nBen Walton\nSystems Programmer - CHASS\nUniversity of Toronto\nC:416.407.5610 | W:416.978.4302\n"}]}