Hacker News new | ask | show | jobs
by EdiX 4795 days ago

    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.
2 comments

    git checkout master
    git reset --hard origin/master
Assuming you're already on master, you can replace those 2 commands with a single one: git branch a-topic-branch