{"thread":{"id":"27947","subject":"the standard hotfix from production scenario not working for me in git...","startedAt":"2011-07-28T17:35:08Z","lastAt":"2011-07-28T20:28:19Z","messageCount":6,"participants":["deanhiller","Luke Diamand","Andreas Schwab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"172298","messageId":"1311874508381-6630648.post@n2.nabble.com","threadId":"27947","inReplyTo":null,"subject":"the standard hotfix from production scenario not working for me in git...","fromName":"deanhiller","fromEmail":"dhiller@ghx.com","sentAt":"2011-07-28T17:35:08Z","receivedAt":"2011-07-28T17:35:08Z","isPatch":false,"sender":{"key":"dhiller@ghx.com","avatar":null},"body":"I am doing the typical scenario and have tried much of the documentation but\nmust be getting something wrong.  I want to do something exactly like\nthis...\n\ncontext: I am on branchBigFeature and a production hot fix comes in.  I\nwould like to\n1. git stash --ALL_including_untracked_Files\n2. git checkout master\n3. git checkout -b newHotfix145\n4. work on hotfix, fix it\n5. git addANDrm * (is there a way to do this??????)  I don't want to have to\ngit rm each file to remove!!! or can I do git rm * ....does that work or\nwill that delete everything....ugh.  Better yet, is there a way to git\ncommit --skipStaging --includeUntrackedFiles --autoDeleteTheDeletions,\nie...basically any change in the view I want applied(unless files are in\n.gitignore of course)\n5. git checkout master\n6. git merge newHotfix145\n7. git push\n8. git checkout branchBigFeature\n9. git stash pop\nand I am back to seeing all my untracked files.\n\nI tried to do this with commit INSTEAD of stash like so but it failed\nmiserably.  I basically tried commit instead of stash and then to get the\nfiles back to untracked, unversioned on the branchBigFeature, I used git\nrevert HEAD and this reverted everything but then it was all in the staging\narea...maybe there is one more command I need to get it from the staging\narea.\n\nand one last question, I 90% of the time want to apply all unstaged files\ndeletes, adds, modifies...is there just one command I can use like git\ncommit * --skipstaging or something.  I have been burned too many times by\nthe build works with ALL the changes and then missing a checkin so I prefer\nto check it all in every time and stay in that habit.\n\nthanks,\nDean\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/the-standard-hotfix-from-production-scenario-not-working-for-me-in-git-tp6630648p6630648.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"172300","messageId":"4E31B51D.2080208@diamand.org","threadId":"27947","inReplyTo":"1311874508381-6630648.post@n2.nabble.com","subject":"Re: the standard hotfix from production scenario not working for me in git...","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2011-07-28T19:14:37Z","receivedAt":"2011-07-28T19:14:37Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On 28/07/11 18:35, deanhiller wrote:\n> I am doing the typical scenario and have tried much of the documentation but\n> must be getting something wrong.  I want to do something exactly like\n> this...\n>\n> context: I am on branchBigFeature and a production hot fix comes in.  I\n> would like to\n\n0. Would it help to use 'git status' to make sure that you don't have \nuntracked flies kicking around?\n\n> 1. git stash --ALL_including_untracked_Files\n> 2. git checkout master\n> 3. git checkout -b newHotfix145\n\nCan you just do 'git checkout -b newHitfix145 master' ?\n\n> 4. work on hotfix, fix it\n> 5. git addANDrm * (is there a way to do this??????)  I don't want to have to\n> git rm each file to remove!!! or can I do git rm * ....does that work or\n> will that delete everything....ugh.  Better yet, is there a way to git\n> commit --skipStaging --includeUntrackedFiles --autoDeleteTheDeletions,\n> ie...basically any change in the view I want applied(unless files are in\n> .gitignore of course)\n> 5. git checkout master\n> 6. git merge newHotfix145\n> 7. git push\n> 8. git checkout branchBigFeature\n> 9. git stash pop\n> and I am back to seeing all my untracked files.\n>\n> I tried to do this with commit INSTEAD of stash like so but it failed\n> miserably.  I basically tried commit instead of stash and then to get the\n> files back to untracked, unversioned on the branchBigFeature, I used git\n> revert HEAD and this reverted everything but then it was all in the staging\n> area...maybe there is one more command I need to get it from the staging\n> area.\n\nPersonally I would try to avoid having untracked files around, but maybe \nthat's just me.\n>\n> and one last question, I 90% of the time want to apply all unstaged files\n> deletes, adds, modifies...is there just one command I can use like git\n> commit * --skipstaging or something.  I have been burned too many times by\n> the build works with ALL the changes and then missing a checkin so I prefer\n> to check it all in every time and stay in that habit.\n\nI usually find I only have a few untracked files at any given time \n(after all, how fast can most people create new code?) so just keeping \nthem tracked isn't a problem. Then 'git commit -a' will do the right \nthing won't it?\n\nLuke\n"},{"id":"172301","messageId":"1311881145388-6631009.post@n2.nabble.com","threadId":"27947","inReplyTo":"4E31B51D.2080208@diamand.org","subject":"Re: the standard hotfix from production scenario not working for me in git...","fromName":"deanhiller","fromEmail":"dhiller@ghx.com","sentAt":"2011-07-28T19:25:45Z","receivedAt":"2011-07-28T19:25:45Z","isPatch":false,"sender":{"key":"dhiller@ghx.com","avatar":null},"body":"/Can you just do 'git checkout -b newHitfix145 master' ?/\n\nCoooooool, one less step!!!!! I think I remember reading that at somepoint,\nbut forgot about it.\n\n/0. Would it help to use 'git status' to make sure that you don't have \nuntracked flies kicking around?/\n\nNot really, I know that I have untracked files lying around(and frequently\ndo git status currently anyways)\n\n/Personally I would try to avoid having untracked files around, but maybe \nthat's just me.  I usually find I only have a few untracked files at any\ngiven time \n(after all, how fast can most people create new code?) so just keeping \nthem tracked isn't a problem. Then 'git commit -a' will do the right \nthing won't it?/\n\nOn a prototype project, the rate of file creation is pretty high so I\nfrequently have untracked files....and I 99% of the time never have an\nuntracked file that I won't be checking in eventually(excluding the\n.gitignore files of course), so having to do a specific step with them is\nquite annoying.\n\nAlso, having to rm each file is \"very\" annoying...anyway to just do a git\ncommit ALL(which includes untracked files(except for .gitignore specified\nones), deleted files, modified files...I think that is the whole list).  \n\nIf I could do a git commit ALL, and then when I get back to that branch,\nmaybe there is a way to do a git reset HEAD BUT restore the committed files\nto the filesystem as untracked/unstaged, etc. etc????\n\nToday, I just copied the whole repository since I was having so much trouble\nso then it is easier to do what I want, but the fact that I have to do that\nfeels like I am back in svn again where I did that as well so I would just\nswitch between directories when working on a hotfix...feels like there\nshould be a way in git as I thought git was avoiding that situation.\n\nthanks,\nDean\n\nLuke\n--\nTo unsubscribe from this list: send the line \"unsubscribe git\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/the-standard-hotfix-from-production-scenario-not-working-for-me-in-git-tp6630648p6631009.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"172302","messageId":"m2fwlqi4n2.fsf@igel.home","threadId":"27947","inReplyTo":"1311874508381-6630648.post@n2.nabble.com","subject":"Re: the standard hotfix from production scenario not working for me in git...","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2011-07-28T19:31:13Z","receivedAt":"2011-07-28T19:31:13Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"deanhiller <dhiller@ghx.com> writes:\n\n> 5. git addANDrm * (is there a way to do this??????)\n\n$ git add -A .\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"172308","messageId":"1311884415976-6631220.post@n2.nabble.com","threadId":"27947","inReplyTo":"m2fwlqi4n2.fsf@igel.home","subject":"Re: the standard hotfix from production scenario not working for me in git...","fromName":"deanhiller","fromEmail":"dhiller@ghx.com","sentAt":"2011-07-28T20:20:15Z","receivedAt":"2011-07-28T20:20:15Z","isPatch":false,"sender":{"key":"dhiller@ghx.com","avatar":null},"body":"THANKYOU.... THAT ROCKS!!! adds deleted files to staging and everything!!!!!\n\nThen the question is after I commit the staging, how can I roll it back so\neverything that was in staging before the commit is that way on the\nfilesystem.\n\n--\nView this message in context: http://git.661346.n2.nabble.com/the-standard-hotfix-from-production-scenario-not-working-for-me-in-git-tp6630648p6631220.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"172309","messageId":"1311884899204-6631245.post@n2.nabble.com","threadId":"27947","inReplyTo":"1311884415976-6631220.post@n2.nabble.com","subject":"Re: the standard hotfix from production scenario not working for me in git...","fromName":"deanhiller","fromEmail":"dhiller@ghx.com","sentAt":"2011-07-28T20:28:19Z","receivedAt":"2011-07-28T20:28:19Z","isPatch":false,"sender":{"key":"dhiller@ghx.com","avatar":null},"body":"SwEEEET, so I tested this with the git stash save and it works\nphenomenal....EXACTLY what I wanted!!!!\n\nthankyou, thankyou!!!\n\nthen just a git stash pop when I get back to the branch.\n\n--\nView this message in context: http://git.661346.n2.nabble.com/the-standard-hotfix-from-production-scenario-not-working-for-me-in-git-tp6630648p6631245.html\nSent from the git mailing list archive at Nabble.com.\n"}]}