How do I use ‘git reset –hard HEAD’ to revert to a previous commit? [duplicate]

First, it’s always worth noting that git reset –hard is a potentially dangerous command, since it throws away all your uncommitted changes. For safety, you should always check that the output of git status is clean (that is, empty) before using it. Initially you say the following: So I know that Git tracks changes I make to my application, … Read more

How do I check out a remote Git branch?

With One Remote With Git versions ≥ 1.6.6, with only one remote, you can do: As user masukomi points out in a comment, git checkout test will NOT work in modern git if you have multiple remotes. In this case use or the shorthand With >1 Remotes Before you can start working locally on a remote branch, … Read more