3 ms·
"Normally, I would have to save the changes (diff) into some file, switch to the main branch abandoning any changes, apply the fix or improvement and commit it.
by randallsquared 13y ago
"Normally, I would have to save the changes (diff) into some file, switch to the main branch abandoning any changes, apply the fix or improvement and commit it. Then I could switch back to my own branch, apply the changes (patch) from the file and continue the work."
Really? Why would you "normally" jump through all these hoops just to work in the same directory? Using svn, my response to this is to jump back to the root of all my projects (~/codebase/ at my current work), checkout a clean version of the branch I need to work on, make changes / test / commit, and rm -rf the whole branch, changing directory back to where I was. If I get blocked on that change for a few hours, I don't have to jump through additional hoops to go back to working on the thing that was interrupted, since I can just change directory back to it.
Is there a reason why this is an awful workflow in git?
- ndeine 13y agoHe's not actually talking about saving the diff and patching within a git repo, as far as I can gather from: > [...], apply the changes (patch) from the file and continue the work. While it is not something difficult, it can be done much easier with Git. Since he's saying "it can be done much easier with Git", the implication is that he wasn't using Git earlier, and the workflow with `git stash` is far cleaner than that diff/patch workflow. At least, I think that's the case. I really can't imagine someone doing that instead of just using Git and `git stash` in the first place.
- Eiwatah4 13y agoThat works just fine. But if you're working on a big project, a full new download can take a while.