Git revert branch to commit => http://coalismade.nnmcloud.ru/d?s=YToyOntzOjc6InJlZmVyZXIiO3M6MjE6Imh0dHA6Ly9iaXRiaW4uaXQyX2RsLyI7czozOiJrZXkiO3M6Mjc6IkdpdCByZXZlcnQgYnJhbmNoIHRvIGNvbW1pdCI7fQ== But from your question there's no reason why people should be blinding you with science. I can get away with this because I know nobody else is developing on branch A. People cannot just pull your rewritten history as usual. Use git log to check how many commits you want to roll back. Time to push both branches with --force if needed, i. The , , and commands are some of the most useful tools in your Git toolbox. With the --hard option, it replaces the contents of your working directory with what was on. Then they can pull a fresh copy after the infringing operation without needing to merge. It alters the existing commit history. No history is rewritten in a revert, making it safe to use when working with others. In such case better do a git revert. How to revert multiple git commits? - Reset only discards changes that haven't been committed yet. Rename your current master branch: git branch -m crazyexperiment Check out your good commit: git checkout c2e7af2b51 Make your new master branch here: git checkout -b master Now you still have your crazy experiment around if you want to look at it later, but your master branch is back at your last known good point, ready to be added to. For example, what should I do if I want to go back to commit c14809fafb08b9e96ff2879999ba8c807d10fb07. For example, can I put some label of each commit to get it back with the label. What good is it if you can't check it back into the remote repository??. I am absolutely amazed at how difficult Git has made simple operations. Or you just want your local repo to look like that. But then if you wanted to push this to someone else who has the new history, it would fail. So what exactly do you want to do with this reset. But a tag is really just a shortcut to git revert branch to commit sha1. See Peter A's answer on how to keep the commits done after the commit reverted to. This means, after looking at your old code, you cannot go to the newest commit in this branch again, easily. The command for bwawok's answer might be: git checkout You can use this to peek at old revision: How did my code look yesterday. I know, I should put this in comments to this answer, but stackoverflow does not allow me to do so. My reputation is too low. This will roll back the repository state as before commit X. It will make your local code and local history be just like it was at that commit. But then if you wanted to push this to local master or remote master with different history, it would fail. So it will be read only version of your repository.