5 ms·
I never had any problems the past 6 years I've been using Git professionally. But then someone asked me what to do when Git prevents you from changing branches
by nurettin 9y ago
I never had any problems the past 6 years I've been using Git professionally. But then someone asked me what to do when Git prevents you from changing branches and not knowing they did not stage, I told them to stash or commit. They stashed and the changes were gone.
My point is, while your basic commands do the work, your habits and knowledge keep you from losing code like this without you knowing.
- bonzini 9y agoWhy were the changes gone? Why couldn't they "git stash pop"?
- mrweasel 9y agoI do like Git, most of the time, but really, not a single problem, in six years? When using Git daily we never really did anything complicated, just a few feature branches per developer, commit, push, pull-request, merge. Basic stuff. We had Git crap out all the time. Never something that couldn't be fixed, but sometimes the fix was: copy your changes somewhere else, nuke your local repo, clone, copy changes in and then commit an continue as normal.
- dbt00 9y agoI’ve been using git since 2007 and never ever even wanted to try nuking a checkout and starting over to recover from anything, much less did so. (Did have a nameless terrible Java ide plug-in do it for me once.)
- TomK32 9y agoIs no one reading git's help pages before running a command the first time? Not even once I lost I code worked on with git. stash is a reliable companion across branches and large timespans.