3 ms·
Why? You can stage the changes you want to commit, and stash the unstaged changes. Run tests, &c. Commit locally but do not push. If you test more and it's stil
by wonderzombie 13y ago
Why? You can stage the changes you want to commit, and stash the unstaged changes. Run tests, &c. Commit locally but do not push. If you test more and it's still broken, you can iterate on that with git commit --amend. The rest of your change will happily live on in the stash.
As others have pointed out, nobody sees your change because it's still only local. That means you could make 10 tiny commits as you work. Then, later on, rebase and squelch a series of smaller commits into a bigger one, and then push, send a pull request, whatever.
- haberman 13y ago> You can stage the changes you want to commit, and stash the unstaged changes. Yes, I have acknowledged that this is a solution to the problem (https://news.ycombinator.com/item?id=6986000 https://news.ycombinator.com/item?id=6986000). It seems a bit roundabout and clumsy to me though, in the sense that it requires vigilance to do the right thing. Things that require vigilance are easy to forget or do incorrectly. I haven't looked at Gitless yet, but I hope that it makes this a bit more streamlined. > squelch a series of smaller commits into a bigger one I think you mean "squash."