Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to download earlier version of source code from bitbucket without any tools

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  

1 answer

0 votes
Mikael Sandberg Community Leader Nov 11, 2020

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,564 views 1 9
Read article

Community Events

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

Events near you