{"thread":{"id":"24785","subject":"checkout w/ removing untracked files","startedAt":"2010-08-18T19:31:54Z","lastAt":"2010-08-23T12:12:30Z","messageCount":3,"participants":["Enrico Weigelt","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"148408","messageId":"20100818193154.GA13204@nibiru.local","threadId":"24785","inReplyTo":null,"subject":"checkout w/ removing untracked files","fromName":"Enrico Weigelt","fromEmail":"weigelt@metux.de","sentAt":"2010-08-18T19:31:54Z","receivedAt":"2010-08-18T19:31:54Z","isPatch":false,"sender":{"key":"weigelt@metux.de","avatar":null},"body":"\nHi folks,\n\nis there an option to do a checkout _exactly_ as the ref'ed tree ?\n(so, also remove untracked files) ?\n\nFor my Briegel buildsystem (git://pubgit.metux.de/projects/briegel.git/)\nI need to checkout a really tree (iow: no untracked files may be\nleft in the workdir) from git. ATM I'm removing and recreating the\nwhole directory first, but I hope to get rid of this step.\n\n\ncu\n-- \n----------------------------------------------------------------------\n Enrico Weigelt, metux IT service -- http://www.metux.de/\n\n phone:  +49 36207 519931  email: weigelt@metux.de\n mobile: +49 151 27565287  icq:   210169427         skype: nekrad666\n----------------------------------------------------------------------\n Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme\n----------------------------------------------------------------------\n"},{"id":"148410","messageId":"7v39ubaedg.fsf@alter.siamese.dyndns.org","threadId":"24785","inReplyTo":"20100818193154.GA13204@nibiru.local","subject":"Re: checkout w/ removing untracked files","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-08-18T19:51:23Z","receivedAt":"2010-08-18T19:51:23Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Enrico Weigelt <weigelt@metux.de> writes:\n\n> For my Briegel buildsystem (git://pubgit.metux.de/projects/briegel.git/)\n> I need to checkout a really tree (iow: no untracked files may be\n> left in the workdir) from git. ATM I'm removing and recreating the\n> whole directory first, but I hope to get rid of this step.\n\n(1) If you have a correctly working \"make reallyclean\" to remove build\n    artifacts, you wouldn't even need such an option.\n\n(2) Have you tried to read up on \"git clean -dfqx\"?\n"},{"id":"148748","messageId":"20100823121229.GA12810@nibiru.local","threadId":"24785","inReplyTo":"7v39ubaedg.fsf@alter.siamese.dyndns.org","subject":"Re: checkout w/ removing untracked files","fromName":"Enrico Weigelt","fromEmail":"weigelt@metux.de","sentAt":"2010-08-23T12:12:30Z","receivedAt":"2010-08-23T12:12:30Z","isPatch":false,"sender":{"key":"weigelt@metux.de","avatar":null},"body":"* Junio C Hamano <gitster@pobox.com> wrote:\n> Enrico Weigelt <weigelt@metux.de> writes:\n> \n> > For my Briegel buildsystem (git://pubgit.metux.de/projects/briegel.git/)\n> > I need to checkout a really tree (iow: no untracked files may be\n> > left in the workdir) from git. ATM I'm removing and recreating the\n> > whole directory first, but I hope to get rid of this step.\n> \n> (1) If you have a correctly working \"make reallyclean\" to remove build\n>     artifacts, you wouldn't even need such an option.\n\nI can't rely on that. Some of the trees aren't even sourcetrees \nbut sysroot images. I need a guaranteed fresh tree w/o any \nuser intervention.\n\n\n> (2) Have you tried to read up on \"git clean -dfqx\"?\n\nThanks, that should do it :)\n\n\ncu\n-- \n----------------------------------------------------------------------\n Enrico Weigelt, metux IT service -- http://www.metux.de/\n\n phone:  +49 36207 519931  email: weigelt@metux.de\n mobile: +49 151 27565287  icq:   210169427         skype: nekrad666\n----------------------------------------------------------------------\n Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme\n----------------------------------------------------------------------\n"}]}