{"thread":{"id":"29388","subject":"found some code...","startedAt":"2012-01-18T01:02:28Z","lastAt":"2012-01-18T22:45:52Z","messageCount":5,"participants":["Ron Eggler","Andrew Ardill","Holger Hellmuth"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"182708","messageId":"loom.20120118T015734-175@post.gmane.org","threadId":"29388","inReplyTo":null,"subject":"found some code...","fromName":"Ron Eggler","fromEmail":"ron.eggler@gmail.com","sentAt":"2012-01-18T01:02:28Z","receivedAt":"2012-01-18T01:02:28Z","isPatch":false,"sender":{"key":"ron.eggler@gmail.com","avatar":null},"body":"Hi There,\n\nSome mishap had happened with my project:\nI found a piece of code that is the most recent one that never got commited to\nthe repository. It is dated December 5th and it definitely is the most recent \npiece of code. \nNow in the mean time I switched computers so I had to reinstall git and get\ncreate new local folders. Now this directory with the most recent code, shows\nevery file as unversioned which should not be true. \nOnly a couple, maybe 3 files had changed with that last change. Now when I commit\nthis now, is that gonna mess up my old repo or can I safely gio ahead and commit\nthat most recent code (even tho it might commit the whole folder) - it almost\nseems like it forgot which files\nwere in the repo vs. which files were in my local folder...\n\nThanks for hints and suggestions how I get myself cleanly out of this mess!\nThanks,\nRon\n"},{"id":"182710","messageId":"CAH5451k4bMJtMLsaFi6g_uRGTL0OdQ5Z1Pss3xuMdWYs+6VcLQ@mail.gmail.com","threadId":"29388","inReplyTo":"loom.20120118T015734-175@post.gmane.org","subject":"Re: found some code...","fromName":"Andrew Ardill","fromEmail":"andrew.ardill@gmail.com","sentAt":"2012-01-18T01:16:49Z","receivedAt":"2012-01-18T01:16:49Z","isPatch":false,"sender":{"key":"andrew.ardill@gmail.com","avatar":"https://gravatar.com/avatar/da14cb7c091dd44dc6c63a4d3361b149acaf25226dc78eb4131a17b93d9b0993?d=mp&s=160"},"body":"Hi Ron,\n\nOn 18 January 2012 12:02, Ron Eggler <ron.eggler@gmail.com> wrote:\n> Hi There,\n>\n> Some mishap had happened with my project:\n> I found a piece of code that is the most recent one that never got commited to\n> the repository. It is dated December 5th and it definitely is the most recent\n> piece of code.\n> Now in the mean time I switched computers so I had to reinstall git and get\n> create new local folders. Now this directory with the most recent code, shows\n> every file as unversioned which should not be true.\n> Only a couple, maybe 3 files had changed with that last change. Now when I commit\n> this now, is that gonna mess up my old repo or can I safely gio ahead and commit\n> that most recent code (even tho it might commit the whole folder) - it almost\n> seems like it forgot which files\n> were in the repo vs. which files were in my local folder...\n>\n> Thanks for hints and suggestions how I get myself cleanly out of this mess!\n> Thanks,\n> Ron\n>\n\nOut of interest, how did you transfer the existing code onto the new\nmachine? In particular, did you clone the existing repository using\ngit clone, or using some other method (such as zipping/emailing)? If\nit was not via clone, did you copy the .git subdirectory, or did you\nrecreate it?\n\nIs the old repository (on the old computer) still available?\n\nRegards,\n\nAndrew Ardill\n"},{"id":"182717","messageId":"2918969.0SyTOLELv0@reg-desktop","threadId":"29388","inReplyTo":"CAH5451k4bMJtMLsaFi6g_uRGTL0OdQ5Z1Pss3xuMdWYs+6VcLQ@mail.gmail.com","subject":"Re: found some code...","fromName":"Ron Eggler","fromEmail":"ron.eggler@gmail.com","sentAt":"2012-01-18T02:49:42Z","receivedAt":"2012-01-18T02:49:42Z","isPatch":false,"sender":{"key":"ron.eggler@gmail.com","avatar":null},"body":"On January 18, 2012 12:16:49 PM Andrew Ardill wrote:\n> Hi Ron,\n> \n> On 18 January 2012 12:02, Ron Eggler <ron.eggler@gmail.com> wrote:\n> > Hi There,\n> > \n> > Some mishap had happened with my project:\n> > I found a piece of code that is the most recent one that never got\n> > commited to the repository. It is dated December 5th and it definitely\n> > is the most recent piece of code.\n> > Now in the mean time I switched computers so I had to reinstall git and\n> > get create new local folders. Now this directory with the most recent\n> > code, shows every file as unversioned which should not be true.\n> > Only a couple, maybe 3 files had changed with that last change. Now when\n> > I commit this now, is that gonna mess up my old repo or can I safely\n> > gio ahead and commit that most recent code (even tho it might commit\n> > the whole folder) - it almost seems like it forgot which files\n> > were in the repo vs. which files were in my local folder...\n> > \n> > Thanks for hints and suggestions how I get myself cleanly out of this\n> > mess! Thanks,\n> > Ron\n> \n> Out of interest, how did you transfer the existing code onto the new\n> machine? In particular, did you clone the existing repository using\n> git clone, or using some other method (such as zipping/emailing)? If\n> it was not via clone, did you copy the .git subdirectory, or did you\n> recreate it?\n\nI copied the whole directory (incl .git) onto a thumb drive.\n \n> Is the old repository (on the old computer) still available?\n\nNo, unfortunately not\n-- \nRon\n"},{"id":"182721","messageId":"4F16973E.8040302@ira.uka.de","threadId":"29388","inReplyTo":"2918969.0SyTOLELv0@reg-desktop","subject":"Re: found some code...","fromName":"Holger Hellmuth","fromEmail":"hellmuth@ira.uka.de","sentAt":"2012-01-18T09:56:14Z","receivedAt":"2012-01-18T09:56:14Z","isPatch":false,"sender":{"key":"hellmuth@ira.uka.de","avatar":null},"body":"On 18.01.2012 03:49, Ron Eggler wrote:\n> On January 18, 2012 12:16:49 PM Andrew Ardill wrote:\n>> Hi Ron,\n>>\n>> On 18 January 2012 12:02, Ron Eggler<ron.eggler@gmail.com>  wrote:\n>>> Hi There,\n>>>\n>>> Some mishap had happened with my project:\n>>> I found a piece of code that is the most recent one that never got\n>>> commited to the repository. It is dated December 5th and it definitely\n>>> is the most recent piece of code.\n>>> Now in the mean time I switched computers so I had to reinstall git and\n>>> get create new local folders. Now this directory with the most recent\n>>> code, shows every file as unversioned which should not be true.\n>>> Only a couple, maybe 3 files had changed with that last change. Now when\n>>> I commit this now, is that gonna mess up my old repo or can I safely\n>>> gio ahead and commit that most recent code (even tho it might commit\n>>> the whole folder) - it almost seems like it forgot which files\n>>> were in the repo vs. which files were in my local folder...\n\nTry \"git update-index --refresh\", more info in this recent thread \n\"http://comments.gmane.org/gmane.comp.version-control.git/188291\"\n\nIf this doesn't help:\nHuman language is very ambiguous. What do you mean by \"found a piece of \ncode\"? Somewhere outside the repository, in a branch inside the \nrepository, in a subdirectory?\nWhat do you mean by \"get create new local folders\"? Do you mean a folder \nwhere you copied the repository or do you mean folders inside your \nrepository where you created new files with your editor?\n"},{"id":"182749","messageId":"4F174BA0.2040109@ira.uka.de","threadId":"29388","inReplyTo":"CAHxBh_QiZzJP2jS6rMpC1c=P8uXSbFWumbcnHj3ArkQB4sXyPQ@mail.gmail.com","subject":"Re: found some code...","fromName":"Holger Hellmuth","fromEmail":"hellmuth@ira.uka.de","sentAt":"2012-01-18T22:45:52Z","receivedAt":"2012-01-18T22:45:52Z","isPatch":false,"sender":{"key":"hellmuth@ira.uka.de","avatar":null},"body":"Mmh, your reply here didn't make it to the mailing list, maybe because \nit was multipart with html(??) or it just got lost.\n\nAm 18.01.2012 18:57, schrieb Ron Eggler:\n>     Try \"git update-index --refresh\", more info in this recent thread\n>     \"http://comments.gmane.org/__gmane.comp.version-control.__git/188291\n>     <http://comments.gmane.org/gmane.comp.version-control.git/188291>\"\n>\n>\n> I got this outputand nothing really changed(generally using TortoiseGit\n> on Windows but did this in the provided bash shell):\n> $ git update-index --refresh\n> MCU2.COF.txt: needs update\n> MCU2.bak: needs update\n> MCU2.c: needs update\n> MCU2.esym: needs update\n> MCU2.h: needs update\n> MCU2.hex: needs update\n> MCU2.lst: needs update\n> MCU2.mcp: needs update\n[...]\n\nOk, \"needs update\" seems to be the non-porcelain version of 'M' (why 'M' \nis more porcelain than \"needs update\" is a mystery to me ;-) respective \n\"Changes not staged for commit\" in git status.\n\nWell, what does it say when you do \"git diff MCU2.h\" ? There are 2 \npossibilities:\n\n1) You see code differences. In that case you should be able to \nrecognize where and when these changes were comitted or not.\n\n2) You see no difference or every line is listed as different even \nthough they seem to be equal. Possible reason is a mixup of line endings \nas git on windows has to convert \\r\\n line endings to \\n line endings \nwhen it checks data in. This is controlled by config variables, and \nmaybe your config is slightly wrong.\n\nIn that case I would create a new repo with git init in bash (not \ntortoise git!), and look at .git/config. Compare that with .git/config \nof your mixed up repo. Also compare with .git/config of the repo on your \nusb stick. As far as I know you should have core.autocrlf set to true on \nWindows.\nAlternatively or for a complete picture you could do \"git config -l\" \nwhich gives you also global and system configuration variables if they \nexist.\n\nAnother possible reason would be file names with same name but different \ncase. I mention this because there is a parallel thread on this mailing \nlist with a problem with tortoise git and windows. See \nhttp://git.661346.n2.nabble.com/Bug-Git-checkout-fails-with-a-wrong-error-message-td7181244.html. \nAs suggested in that thread you should have the option core.ignorecase set.\n\n\n> Ok ,let's see:\n> I \"found\" the piece of code on my thumbdrive and it ultimately is copied\n> from my \"old\" working directory from the computer i don't have\n> anymore... \"get create new local folders\" means that I actually created\n> a new folder on my new machine and  cloned the repo from git into it so\n> this would be my new working directory... now i have the code that\n> should be in there seperatetely in the directory from the thumb drive....\n> Does that make any more ssense?\n>\n"}]}