News for hackers. Stuff that matters.
Re:Git pull --rebase until it hurts by derefr on Tuesday April 30, 2013 @06:09AM (#5631258)
> It’s essentially an anonymous branch. ... Maybe you should have explicitly branched, but hey, we’re all human.

This is the real key here. Most don't really want git-merge(1) or git-rebase(1). They want git-go-back-and-extract-my-commits-into-a-topic-branch(1).

Re:Git pull --rebase until it hurts by erso on Tuesday April 30, 2013 @07:47AM (#5631559)
If you have some commits:

    A-B-C-D-E-F-G
Where B is master and origin/master, and you decide you want to make C..G into a topic branch, topicA:

git branch topicA

    A-B-C-D-E-F-G (master)
    A-B-C-D-E-F-G (topicA)
git reset --hard B

    A-B (master)
    A-B-C-D-E-F-G (topicA)
git merge --no-ff topicA

    A-B-----------H (master)
       \         /
        C-D-E-F-G (topicA)
Re:Git pull --rebase until it hurts by EdiX on Tuesday April 30, 2013 @06:23AM (#5631294)

    git checkout -b a-topic-branch
    git checkout master
then you reset master to the remote master, there is a command to do it but I do this kind of things with gitk.
Re:Git pull --rebase until it hurts by michaelmior on Tuesday April 30, 2013 @06:41AM (#5631343)

    git checkout master
    git reset --hard origin/master
Re:Git pull --rebase until it hurts by graywh on Tuesday April 30, 2013 @10:02AM (#5632227)
Assuming you're already on master, you can replace those 2 commands with a single one: git branch a-topic-branch