I was given a task to push source codes to bitbucket server and I have no issue in doing so using the git command. However, I am stuck when I was told to restore the source codes for an earlier commit. Assuming that I have make 10 commits for the source code and I wish to restore the codes for the 5th commit point. How can I pull the whole set of codes ? The download command shall download the latest codes and that is not what i wanted. Please advise.
Bitbucket do not have a feature to do a clone of a specific commit, mainly because Git does not have that option. To get a specific commit just clone the repository as normal and then you can do a git reset <commit> --hard
As of Git 2.5.0 you can ignore the security in Git and do a shallow clone to a specific commit, but both your server and client needs to be on Git 2.5.0 or above. Have a look at Why Isn't There A Git Clone Specific Commit Option? for more information.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events