![]() ![]() Git checkout will be the more appropriate command for this scenario, by allowing to observe and branch out of a previous commit, while keeping all the changes and history intact. If I understood the question correctly, git reset violates what's asked for in the original question, as quoted: "I would just simply like to go back with the option of going forward again". Git reset is a destructive command that deletes changes following the target commit (commit-hash when running git reset or the latest commit when running git reset). For example: git reset f7823ab -hardĪ strong caveat should be given before considering using git reset. To get the original state of the commit that you want to 'revert', you have to pass -hard. So, all changes made, since that commit you reset to, will still be there. ![]() Have in mind that, by default, the option -mixed is passed to git reset. Once the installer has started, follow the instructions as provided in the Git Setup wizard screen until the installation is complete. Or to a specific commit by git reset f7823ab Install Git on Windows Navigate to the latest Git for Windows installer and download the latest version. Or some more commits (for example 3) by git reset HEAD^3 You will go back to the previous commit with git reset HEAD^ Most clients provide this in their UI using the same vocabulary (usually, you are able to select a commit and reset to it via context menu). To mention a few (that support git reset): GitHub Desktop is more of a tool to synchronize your repositories and not a full featured GUI client.īut that doesn't mean you have to use the command line, since there are alternatives. This is not possible with GitHub Desktop. In general, you can go back to a commit in your history with git reset. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |