4

I would like to use GitHub for Windows without sharing the project (well I don't want to pay to get the private project option, and I don't want to share it as open source), so basically use it as a GUI for git. I made a test project to play around with it. I've made some changes and committed them. Now how do I roll back? there's no such option. Maybe I'm blind?

0

6 Answers 6

3
  1. Click on the cog wheel then click on "Undo most recent commit".Note that this will undo only the last commit if you committed more than once.

  2. Select the repository in the leftmost column and click on the tab "Changes". You will see your changed files on the right. If you right-click on any file you'll have an option to "Discard changes". Click that and all your changes are wiped out and your local files will be back to where they were the last time you made a commit.

  3. repeat point 1 and 2 as many time as you want for all of your commits from the last to the first

1
  • This is the most proper way of doing what the OP inquired about and is functionally similar, although less intuitive, than the previously supported rollback feature.
    – deadboy
    Jun 22, 2015 at 19:58
1

The latest update removed the "rollback" button. As of now, the best option is to open a Git Shell and rollback manually.

3
  • do you know why this descision was made?
    – atoms
    Mar 13, 2015 at 12:38
  • @atoms I really don't know. It's a silly decision imo.
    – runDOSrun
    Mar 13, 2015 at 13:08
  • yeah I would agree, I have it on the OSX version and use it all the time. Another dev installed it for windows and its not there! Cant seem to find an explanation either
    – atoms
    Mar 14, 2015 at 22:15
0

If you click on the cog wheel, you can click on "Undo most recent commit", which might be what you are after. Be aware though anything in the most recent commit will be gone! No way to get it back as far as I know.

0

I am just learning GitHub as well. The rollback button has been removed in newer version of Github for Windows. We have to go to GitShell and use "git reset ..."

git reset --hard <tag/branch/commit id>

Please check this link How do you roll back (reset) a Git repository to a particular commit for more details.

0

Github for Windows (2018 Version) has a small undo button in the lower left-hand corner showing the most recent commit and an undo button (as long as you have not pushed the change).

enter image description here

0

In Github for windows version 2.4.1, there is no "rollback" button. Because it will cast away your commit. "Revert" is what you need and do better. Do as following:

  1. Open "History" panel;
  2. Right-click the commit you don't want and choose "Revert this commit";
  3. If it isn't the lastest commit, deal with the Conflict.

So "Revert" will make a new commit. Push it and done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.