{"thread":{"id":"38654","subject":"Re: About checkout with untracked files on remote.","startedAt":"2015-02-25T19:45:08Z","lastAt":"2015-02-25T19:45:08Z","messageCount":1,"participants":["Eugene Fedorov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"256654","messageId":"DEA06477-4036-4941-A0C6-CF3D5DB15C96@gmail.com","threadId":"38654","inReplyTo":"F195C0CF-55E5-40AE-B5E1-7CA6D46DF3A6@gmail.com","subject":"Re: About checkout with untracked files on remote.","fromName":"Eugene Fedorov","fromEmail":"jek.fdrv@gmail.com","sentAt":"2015-02-25T19:45:08Z","receivedAt":"2015-02-25T19:45:08Z","isPatch":false,"sender":{"key":"jek.fdrv@gmail.com","avatar":null},"body":"I have specific case which you can use to improve git.\n\nMy example:\nI have 2 branches - master, implement_button.\nBranch implement_button add some button with few style.css and fonts files.\nBoth branches have same git ignore file where all fonts and css folders with files ignored.\n\nThe point:\nNow my active branch is implement_button. \n1 Try to checkout to remote master branch and get error:\nerror: The following untracked working tree files would be overwritten by checkout:\ncss/style.css\ncss/fonts/RobotoSlab-Bold-webfont.eot\nPlease move or remove them before you can switch branches.\nAborted.\n\nSo we have case where master haven’t new ignored files.\nWe can’t use \"git clean -df\" bc it not clean untracked files. Bc implement_button branch it is not untracked.\nI can’t use \"git clean -dfx» bc i need some another ignored files.\nI can’t use force checkout bc i need this files be deleted.\nAlso i can’t get this error without run checkout, so or i will be checkout or error. Dry-run not work for this command.  http://stackoverflow.com/questions/28714372/how-to-catch-git-error-on-checkout-without-checkout/28714462#28714462\n\nSo i need help understand how i can do this? Parse rendered error to get the list of files to drop and drop them? \nHope i can do this in another way =)\n\nP.S. Thank you very much for try help me =)"}]}