Hello, I am totally new to this git and repositories thing but I can see the benifits right away.
What is the best way to completely revert to a previous commit? Let's say I want to go back three commits ago and start over from that point. I'm using SourceTree.
If you've already pushed these commits to a remote then you probably shouldn't be doing this, because the commits could already have been seen by someone else, which will then cause them problems if they're effectively orphaned and no longer part of the branch going forward.
If you know for sure that no-one except you has seen these commits then you can push your branch to the remote to bring it back into sync with your own local repo. What the reset is doing is moving the branch pointer backwards, orphaning the commits you made before, and which will get garbage collected eventually if nothing continued to point to them.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs