News for hackers. Stuff that matters.
Re:Why is git pull considered harmful? (2013) by gbog on Wednesday March 12, 2014 @10:51AM (#7385914)
Except that you need to know what you will do in advance, in order to give a meaningful name to the branch, and you need to delete odds branches in order to find your way when switching, et cetera.

The first point is stronger than it seems, at least for me. It is a bit like requiring a definitive title to a novel I'm starting to write before the first line is there.

Re:Why is git pull considered harmful? (2013) by Crito on Wednesday March 12, 2014 @11:26AM (#7386126)
Branches are literally just text files that contain a sha in refs/heads. The name of the file is the name of your branch. They are an incredibly lightweight concept that should never be considered the source of any sort of technical debt.
Re:Why is git pull considered harmful? (2013) by Cthulhu_ on Wednesday March 12, 2014 @11:33AM (#7386181)
Luckily with Git, you have infinite power with that kinda thing - at least until you push and share your code. Branching is cheap; moving commits from one branch to another is easy; creating a branch after you've done a couple commits is simple.

The difficult part, I think, is on the one side realizing what power you have and how to use it, and on the other side plain discipline.

Re:Why is git pull considered harmful? (2013) by jstclair on Wednesday March 12, 2014 @11:07AM (#7385996)
To rename: git branch -m old-name new-name

Candidate branches for deletion: git branch --merged

Re:Why is git pull considered harmful? (2013) by aqme28 on Wednesday March 12, 2014 @11:47AM (#7386305)
I think that knowing what you want to do before you try to do it is a good engineering practice in its own right.
Re:Why is git pull considered harmful? (2013) by gbog on Wednesday March 12, 2014 @10:45PM (#7389794)
Not sure.

Do you think Da Vinci sat at his table and thought "let's invent the helicopter" (with a nice unique memorable name for his work in progress)?

I would rather imagine Da Vinci being supposed to draw some boring architectural work or even writing against his will to his great-grant aunt. And then a paper fell off his table, spinning away. And then I imagine Da Vinci drawing a spinning paper on the margins, and adding equations, schemas, and getting deeply inside this new project, which becomes clearer in his mind as he works on it, without ever having a name.

This is exactly why I hate deciding a branch name before some tasks and I love `git add -p` which allow me to add a bucnh of unrelated things in the work tree and extract the juice later.

Re:Why is git pull considered harmful? (2013) by yock on Thursday March 13, 2014 @10:54AM (#7392158)
Here, $10 well spent. Watch and be enlightened.

http://pragprog.com/screencasts/v-jwsceasy/source-control-ma...

Re:Why is git pull considered harmful? (2013) by yock on Thursday March 13, 2014 @10:53AM (#7392149)
With git you can experiment to your hearts content. Then, once you decide you have something ready to go, create the branch and commit to it. You don't have to create the branch first.
Re:Why is git pull considered harmful? (2013) by dllthomas on Thursday March 13, 2014 @10:54AM (#7392161)
Or even create some branches called "experiment1", "experiment2", &c, until you figure out what it should be called.
Re:Why is git pull considered harmful? (2013) by Aloisius on Wednesday March 12, 2014 @05:33PM (#7388553)
Then use git stash?