{"thread":{"id":"16921","subject":"is there an easier way to do this ?","startedAt":"2008-12-30T02:44:15Z","lastAt":"2009-01-01T16:55:43Z","messageCount":8,"participants":["Zorba","Jacob Helwig","Jeff Whiteside","Jakub Narebski","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98935","messageId":"gjc52u$ehc$4@ger.gmane.org","threadId":"16921","inReplyTo":null,"subject":"is there an easier way to do this ?","fromName":"Zorba","fromEmail":"cr@altmore.co.uk","sentAt":null,"receivedAt":"2008-12-30T02:44:15Z","isPatch":false,"sender":{"key":"cr@altmore.co.uk","avatar":null},"body":"ok, now I'm in this for real, archiving versions of our website project (5k \nfiles approx)\n\nso here is the workflow:\n\n- copy version 1 files into GIT dir\n\n- open git bash\n\n$ git init\n\n$ git add .\n\n$ git commit -m \"version1\"\n\nall vanilla ? cool\nnext job = store version 2, so delete version 1 files from GIT dir, copy in \nversion 2\nversion2 has different files from 1 - which ones? Out of 5k files could be \n1% = 50 new ones, and same amount removed. Why should I care, with such a \npowerful friend as git around, n'est pas?\nTHIS TIME we are going to be CLEVER and use \"-a\" flag on commit to pick up \nany files that have been REMOVED (or \"deleted\" in git-speak)\n\n$ git commit -a -m \"version2\"\n\nBUT this does not pick up any new ones that have been added,\n\nand when we run\n\n$ git status > ../git_status.txt\n\nthese are referred to as \"untracked files\"\nonly problem there are 50 ish\nis there not another flag on git commit to treat any untracked file as a new \nfile ?\n(would save me typing or creating a list out of these untracked ones and \nfeeding them into git add)\n\nI know, I realise now I should have looked up git-commit in the manual - in \ncase its not there, pls enlighten me !\n"},{"id":"98937","messageId":"8c9a060812291946w5a38d1a1iefa28679e24347bf@mail.gmail.com","threadId":"16921","inReplyTo":"gjc52u$ehc$4@ger.gmane.org","subject":"Re: is there an easier way to do this ?","fromName":"Jacob Helwig","fromEmail":"jacob.helwig@gmail.com","sentAt":"2008-12-30T03:46:14Z","receivedAt":"2008-12-30T03:46:14Z","isPatch":false,"sender":{"key":"jacob.helwig@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14557?v=4"},"body":"On Mon, Dec 29, 2008 at 19:37, Zorba <cr@altmore.co.uk> wrote:\n> ok, now I'm in this for real, archiving versions of our website project (5k\n> files approx)\n>\n> so here is the workflow:\n>\n> - copy version 1 files into GIT dir\n>\n> - open git bash\n>\n> $ git init\n>\n> $ git add .\n>\n> $ git commit -m \"version1\"\n>\n> all vanilla ? cool\n> next job = store version 2, so delete version 1 files from GIT dir, copy in\n> version 2\n> version2 has different files from 1 - which ones? Out of 5k files could be\n> 1% = 50 new ones, and same amount removed. Why should I care, with such a\n> powerful friend as git around, n'est pas?\n> THIS TIME we are going to be CLEVER and use \"-a\" flag on commit to pick up\n> any files that have been REMOVED (or \"deleted\" in git-speak)\n>\n> $ git commit -a -m \"version2\"\n>\n> BUT this does not pick up any new ones that have been added,\n>\n> and when we run\n>\n> $ git status > ../git_status.txt\n>\n> these are referred to as \"untracked files\"\n> only problem there are 50 ish\n> is there not another flag on git commit to treat any untracked file as a new\n> file ?\n> (would save me typing or creating a list out of these untracked ones and\n> feeding them into git add)\n>\n> I know, I realise now I should have looked up git-commit in the manual - in\n> case its not there, pls enlighten me !\n>\n>\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\ngit help add\n\nLook at -A\n"},{"id":"98938","messageId":"gjc5t2$g02$4@ger.gmane.org","threadId":"16921","inReplyTo":"gjc52u$ehc$4@ger.gmane.org","subject":"Re: is there an easier way to do this ?","fromName":"Zorba","fromEmail":"cr@altmore.co.uk","sentAt":null,"receivedAt":"2008-12-30T03:46:14Z","isPatch":false,"sender":{"key":"cr@altmore.co.uk","avatar":null},"body":"The manual shows you can SHOW untracked files, but not add them as part of \nthe commit -a jig\n\nSeems a bit strange that git-add operates on both exisging and new files \nwhen used standalone, but its behaviour changes when encapsulated in \ncommit -a...\n\nSo, I thought maybe $ git commit -a, then $ git add .\nbut then the files tracked have missed the commit boat they were meant to be \non, haven't they,\n\nhang on -\nwhat about\n\n$ git add .\n$ git commit -a\n\nI do believe I've cracked it\nif so, it seems a bit wasteful, 2x adds (one explicti and one embedded \nin -a) ? shame on you linux kernel guys, i'd have expected better :-)\n\n\"Zorba\" <cr@altmore.co.uk> wrote in message \nnews:gjc52u$ehc$4@ger.gmane.org...\n> ok, now I'm in this for real, archiving versions of our website project \n> (5k files approx)\n>\n> so here is the workflow:\n>\n> - copy version 1 files into GIT dir\n>\n> - open git bash\n>\n> $ git init\n>\n> $ git add .\n>\n> $ git commit -m \"version1\"\n>\n> all vanilla ? cool\n> next job = store version 2, so delete version 1 files from GIT dir, copy \n> in version 2\n> version2 has different files from 1 - which ones? Out of 5k files could be \n> 1% = 50 new ones, and same amount removed. Why should I care, with such a \n> powerful friend as git around, n'est pas?\n> THIS TIME we are going to be CLEVER and use \"-a\" flag on commit to pick up \n> any files that have been REMOVED (or \"deleted\" in git-speak)\n>\n> $ git commit -a -m \"version2\"\n>\n> BUT this does not pick up any new ones that have been added,\n>\n> and when we run\n>\n> $ git status > ../git_status.txt\n>\n> these are referred to as \"untracked files\"\n> only problem there are 50 ish\n> is there not another flag on git commit to treat any untracked file as a \n> new file ?\n> (would save me typing or creating a list out of these untracked ones and \n> feeding them into git add)\n>\n> I know, I realise now I should have looked up git-commit in the manual - \n> in case its not there, pls enlighten me !\n>\n>\n> \n"},{"id":"98939","messageId":"8c9a060812292000k18ccd466g628ea4161bac188b@mail.gmail.com","threadId":"16921","inReplyTo":"gjc5t2$g02$4@ger.gmane.org","subject":"Re: is there an easier way to do this ?","fromName":"Jacob Helwig","fromEmail":"jacob.helwig@gmail.com","sentAt":"2008-12-30T04:00:53Z","receivedAt":"2008-12-30T04:00:53Z","isPatch":false,"sender":{"key":"jacob.helwig@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14557?v=4"},"body":"On Mon, Dec 29, 2008 at 19:51, Zorba <cr@altmore.co.uk> wrote:\n> The manual shows you can SHOW untracked files, but not add them as part of\n> the commit -a jig\n>\n> Seems a bit strange that git-add operates on both exisging and new files\n> when used standalone, but its behaviour changes when encapsulated in\n> commit -a...\n>\n> So, I thought maybe $ git commit -a, then $ git add .\n> but then the files tracked have missed the commit boat they were meant to be\n> on, haven't they,\n>\n> hang on -\n> what about\n>\n> $ git add .\n> $ git commit -a\n>\n> I do believe I've cracked it\n> if so, it seems a bit wasteful, 2x adds (one explicti and one embedded\n> in -a) ? shame on you linux kernel guys, i'd have expected better :-)\n>\n> \"Zorba\" <cr@altmore.co.uk> wrote in message\n> news:gjc52u$ehc$4@ger.gmane.org...\n>> ok, now I'm in this for real, archiving versions of our website project\n>> (5k files approx)\n>>\n>> so here is the workflow:\n>>\n>> - copy version 1 files into GIT dir\n>>\n>> - open git bash\n>>\n>> $ git init\n>>\n>> $ git add .\n>>\n>> $ git commit -m \"version1\"\n>>\n>> all vanilla ? cool\n>> next job = store version 2, so delete version 1 files from GIT dir, copy\n>> in version 2\n>> version2 has different files from 1 - which ones? Out of 5k files could be\n>> 1% = 50 new ones, and same amount removed. Why should I care, with such a\n>> powerful friend as git around, n'est pas?\n>> THIS TIME we are going to be CLEVER and use \"-a\" flag on commit to pick up\n>> any files that have been REMOVED (or \"deleted\" in git-speak)\n>>\n>> $ git commit -a -m \"version2\"\n>>\n>> BUT this does not pick up any new ones that have been added,\n>>\n>> and when we run\n>>\n>> $ git status > ../git_status.txt\n>>\n>> these are referred to as \"untracked files\"\n>> only problem there are 50 ish\n>> is there not another flag on git commit to treat any untracked file as a\n>> new file ?\n>> (would save me typing or creating a list out of these untracked ones and\n>> feeding them into git add)\n>>\n>> I know, I realise now I should have looked up git-commit in the manual -\n>> in case its not there, pls enlighten me !\n>>\n>>\n>>\n>\n>\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\nIf you do an explicit git add, then you don't need the -a on git\ncommit, since everything you want to commit will already be in the\nindex for git commit to work with.\n"},{"id":"98943","messageId":"3ab397d0812292026j2feedf50tdbaa0109f89543f7@mail.gmail.com","threadId":"16921","inReplyTo":"8c9a060812292000k18ccd466g628ea4161bac188b@mail.gmail.com","subject":"Re: is there an easier way to do this ?","fromName":"Jeff Whiteside","fromEmail":"jeff.m.whiteside@gmail.com","sentAt":"2008-12-30T04:26:49Z","receivedAt":"2008-12-30T04:26:49Z","isPatch":false,"sender":{"key":"jeff.m.whiteside@gmail.com","avatar":null},"body":"$ git add .\n$ git commit -a\n\nno, you don't need git commit -a, just git commit\n\nso,\n\n$ git add .\n$ git commit -m \"my msg\"\n\nwhy?\n\ngit add . will add everything to the index, including a notation about\nremoving deleted files (i hope you know what the index is, if not,\ngoogle 'index' or 'staging area', this will clear everything up).\n\ngit commit will take everything from the index and commit (not the\nworking tree of files) it to the actual repository.\n\ngit commit -a will take every file that is already tracked in git, but\nNOT newly added files, and add/update the content in the index, then\ncommit it.\n\nso, git commit -a is equivalent to\n\ngit add -u\ngit commit\n\n\n\nOn Mon, Dec 29, 2008 at 8:00 PM, Jacob Helwig <jacob.helwig@gmail.com> wrote:\n> On Mon, Dec 29, 2008 at 19:51, Zorba <cr@altmore.co.uk> wrote:\n>> The manual shows you can SHOW untracked files, but not add them as part of\n>> the commit -a jig\n>>\n>> Seems a bit strange that git-add operates on both exisging and new files\n>> when used standalone, but its behaviour changes when encapsulated in\n>> commit -a...\n>>\n>> So, I thought maybe $ git commit -a, then $ git add .\n>> but then the files tracked have missed the commit boat they were meant to be\n>> on, haven't they,\n>>\n>> hang on -\n>> what about\n>>\n>> $ git add .\n>> $ git commit -a\n>>\n>> I do believe I've cracked it\n>> if so, it seems a bit wasteful, 2x adds (one explicti and one embedded\n>> in -a) ? shame on you linux kernel guys, i'd have expected better :-)\n>>\n>> \"Zorba\" <cr@altmore.co.uk> wrote in message\n>> news:gjc52u$ehc$4@ger.gmane.org...\n>>> ok, now I'm in this for real, archiving versions of our website project\n>>> (5k files approx)\n>>>\n>>> so here is the workflow:\n>>>\n>>> - copy version 1 files into GIT dir\n>>>\n>>> - open git bash\n>>>\n>>> $ git init\n>>>\n>>> $ git add .\n>>>\n>>> $ git commit -m \"version1\"\n>>>\n>>> all vanilla ? cool\n>>> next job = store version 2, so delete version 1 files from GIT dir, copy\n>>> in version 2\n>>> version2 has different files from 1 - which ones? Out of 5k files could be\n>>> 1% = 50 new ones, and same amount removed. Why should I care, with such a\n>>> powerful friend as git around, n'est pas?\n>>> THIS TIME we are going to be CLEVER and use \"-a\" flag on commit to pick up\n>>> any files that have been REMOVED (or \"deleted\" in git-speak)\n>>>\n>>> $ git commit -a -m \"version2\"\n>>>\n>>> BUT this does not pick up any new ones that have been added,\n>>>\n>>> and when we run\n>>>\n>>> $ git status > ../git_status.txt\n>>>\n>>> these are referred to as \"untracked files\"\n>>> only problem there are 50 ish\n>>> is there not another flag on git commit to treat any untracked file as a\n>>> new file ?\n>>> (would save me typing or creating a list out of these untracked ones and\n>>> feeding them into git add)\n>>>\n>>> I know, I realise now I should have looked up git-commit in the manual -\n>>> in case its not there, pls enlighten me !\n>>>\n>>>\n>>>\n>>\n>>\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>\n> If you do an explicit git add, then you don't need the -a on git\n> commit, since everything you want to commit will already be in the\n> index for git commit to work with.\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":"99009","messageId":"m3k59hb6xr.fsf@localhost.localdomain","threadId":"16921","inReplyTo":"gjc52u$ehc$4@ger.gmane.org","subject":"Re: is there an easier way to do this ?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-12-30T23:03:34Z","receivedAt":"2008-12-30T23:03:34Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Zorba\" <cr@altmore.co.uk> writes:\n\n> ok, now I'm in this for real, archiving versions of our website project (5k \n> files approx)\n> \n> so here is the workflow:\n> \n> - copy version 1 files into GIT dir\n> \n> - open git bash\n> \n> $ git init\n> \n> $ git add .\n> \n> $ git commit -m \"version1\"\n> \n> all vanilla ? cool\n> next job = store version 2 [...]\n\nCheck out contrib/fast-import/import-tars.perl\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"99012","messageId":"gjeacg$3r5$4@ger.gmane.org","threadId":"16921","inReplyTo":"m3k59hb6xr.fsf@localhost.localdomain","subject":"Re: is there an easier way to do this ?","fromName":"Zorba","fromEmail":"cr@altmore.co.uk","sentAt":null,"receivedAt":"2008-12-30T23:15:43Z","isPatch":false,"sender":{"key":"cr@altmore.co.uk","avatar":null},"body":"thanks Jakub, but I don't mind copying the versions in by hand and running \nthe git commits on them sequentially.\n\nI only have 5 max historical versions to archive..\n\n\"Jakub Narebski\" <jnareb@gmail.com> wrote in message \nnews:m3k59hb6xr.fsf@localhost.localdomain...\n> \"Zorba\" <cr@altmore.co.uk> writes:\n>\n>> ok, now I'm in this for real, archiving versions of our website project \n>> (5k\n>> files approx)\n>>\n>> so here is the workflow:\n>>\n>> - copy version 1 files into GIT dir\n>>\n>> - open git bash\n>>\n>> $ git init\n>>\n>> $ git add .\n>>\n>> $ git commit -m \"version1\"\n>>\n>> all vanilla ? cool\n>> next job = store version 2 [...]\n>\n> Check out contrib/fast-import/import-tars.perl\n>\n> -- \n> Jakub Narebski\n> Poland\n> ShadeHawk on #git \n"},{"id":"99089","messageId":"alpine.DEB.1.00.0901011754130.30769@pacific.mpi-cbg.de","threadId":"16921","inReplyTo":"gjeacg$3r5$4@ger.gmane.org","subject":"Re: is there an easier way to do this ?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-01T16:55:43Z","receivedAt":"2009-01-01T16:55:43Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nA: Because it messes up the order in which people normally read text.\nQ: Why is top-posting such a bad thing?\nA: Top-posting.\nQ: What is the most annoying thing on usenet and in e-mail?\n\nOn Tue, 30 Dec 2008, Zorba wrote:\n\n> > \"Zorba\" <cr@altmore.co.uk> writes:\n> >\n> >> ok, now I'm in this for real, archiving versions of our website project \n> >> (5k\n> >> files approx)\n> >>\n> >> so here is the workflow:\n> >>\n> >> - copy version 1 files into GIT dir\n> >>\n> >> - open git bash\n> >>\n> >> $ git init\n> >>\n> >> $ git add .\n> >>\n> >> $ git commit -m \"version1\"\n> >>\n> >> all vanilla ? cool\n> >> next job = store version 2 [...]\n> >\n> > Check out contrib/fast-import/import-tars.perl\n>\n> thanks Jakub, but I don't mind copying the versions in by hand and \n> running the git commits on them sequentially.\n\nIt's not only about how much work you are doing.  It's also about \npreserving as much metadata as possible.\n\nCiao,\nDscho\n"}]}