News for hackers. Stuff that matters.
Re:Using 'git stash' as a todo list by apinstein on Sunday November 28, 2010 @11:24PM (#1949372)
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!

Re:Using 'git stash' as a todo list by vwelch on Monday November 29, 2010 @10:11PM (#1952892)
Interesting idea, I played with branches and added a simple script to the end of my blog post to show what it would take - it's a half dozen lines of git if you want so skip the click, with the tricky bit being figuring out what branch you start from so you can return to it.

Seems workable, though by the time you're done working out the details, seems like you should just use a real issue tracker.

I think of my approach as the moral equivalent of post-it notes on the monitor, I wouldn't want to base any important system on it, but it's useful at times.

Re:Using 'git stash' as a todo list by augustl on Sunday November 28, 2010 @11:46PM (#1949408)
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?
Re:Using 'git stash' as a todo list by apinstein on Monday November 29, 2010 @10:12PM (#1952894)
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.

Re:Using 'git stash' as a todo list by vwelch on Monday November 29, 2010 @10:46PM (#1952977)
Hmmm, a CLI that created a branch and an issue on github and tied them together in some magical way would be way cool.