Hi there,
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.
Thank you
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.