Re: Cleaning up git user-interface warts
From: Shawn Pearce <hidden>
Date: 2016-08-11 19:34:22
Jakub Narebski [off-list ref] wrote:
Carl Worth wrote:quoted
On Tue, 14 Nov 2006 16:31:50 -0800, Junio C Hamano wrote:quoted
For another example, having a commit command to commit everything by default is disastrous for people who allow their workflows to often be interrupted.Workflow-interruption is an important thing to support, but separating update-index and commit really doesn't address it nearly as much as I would like. The lack of really good workflow-interruption support has been one of my longest-running annoyances with git, (perhaps because I have a problem with trying to do too many things at once). Git can create and change branches fast enough that it really should be able to help me better with this. The only missing piece is being able to stash the dirty stuff on the current branch, to be able to come back to it later. I've talked a bit about what I would like in this area before, and I really just need to code it up.There is git-stash/git-unstash floating somewhere in the archive.
I find that a "git commit -a -m parked; git checkout -b ..." works well to stash my current stuff off. Then I just amend the commit when I come back to that branch. The problem I just ran into today was "git checkout" doesn't double check the file stat data against the index before switching branches. If the file is unchanged between the two branches there's no error. So I switched branches with dirty files that I forgot to park on the old branch. --