News for hackers. Stuff that matters.
Re:Lesser known Git commands by spinningarrow on Friday September 30, 2016 @11:51AM (#12613184)
If you're stashing your changes, that means they're just in the working copy and haven't been committed to the incorrect branch.

In this case, simply create the branch and switch to it (git checkout -b branchname) and you're good. It's like it never happened ;) (remember that branches are just labels - until you commit it doesn't really matter).

Re:Lesser known Git commands by ryanSrich on Friday September 30, 2016 @11:56AM (#12613229)
Typically once I've noticed I haven't branched is after I've already added and committed.
Re:Lesser known Git commands by sammoth on Friday September 30, 2016 @12:04PM (#12613276)
Then just create the branch where you are, and afterwards go back and reset the original branch
Re:Lesser known Git commands by convolvatron on Friday September 30, 2016 @02:31PM (#12614302)
and make sure to patch up the upstream reference