

Using 'git stash' as a todo list - timf
http://blog.vwelch.com/2010/11/using-git-stash-as-todo-list.html

======
Xurinos
I just use

    
    
        git add -p
    

That way I can code at my leisure and worry less about the bookkeeping until I
am ready to publish.

~~~
arnoooooo
I do that as well, but I don't really like that I'm actually committing
untested code, since I might forget a needed part.

~~~
thomas11
You can test exactly what you're about to commit by doing a `git stash save
--keep-index`, then test, commit, and `git stash pop` to get your working tree
back.

------
apinstein
Isn't this what branches are for? This seems ridiculous.

I applaud the ingenuity but I think the author would be better off making a
shortcut/alias to create a branch from the current head with some interesting
name and commit message and commit the changes to the new branch, then switch
back to the current one.

One accidental "git stash clear" and this dude's setup is wiped!

~~~
augustl
I believe you're describing creating a branch with one commit that only
contains a selection of the changes in the index. What are the commands to do
that?

~~~
apinstein
Ah I think I missed that nugget when I read the article... he is committing
just a partial with his one TODO diff only. I didn't notice that.

Still he should use an issue tracker, and then some branches :)

In fact a guy at our company hacked out a really cool git-pivotal integration
that lets you create a branch to work on a specific story from the CLI
<https://github.com/ardell/Git-Pivotal> I think it'd be trivial to write a
simple CLI script to add a TODO to an issue tracker this way as well.

~~~
vwelch
Hmmm, a CLI that created a branch and an issue on github and tied them
together in some magical way would be way cool.

