Adding a new commit before the Start of Branch

I started a private repository on Bitbucket, and was using it to save and control versions of my programs. I'm using Sourcetree to maintain local copy of repository.  

When I started, the program version I was working upon was V3.0. Over the time, as I learnt more and more about the sourcetree, and benefits of version control overall, ability to share with team mates I am working with etc.

There are only 4-5 commits on my repository. I was hoping to add my older versions as well to the branch, V1 and V2, so that I/team members can access them.

Is there a way to do that?

One way I know of is to save all the present development versions from bitbucket, save them , and re-create the repository, starting with V1..


But I hope there is another option available, and I cannot find how to do that? Can I commit these old versions, and then move before the Start of branch?

Any help would be appreciated


1 answer

You can do this:

  • create a branch with the old commits (if it does not exist already)
  • rebase the current branch on top of the one with the old commits
  • (rename branches, if needed)
  • force push

N.B. After the force push, everybody else will need to re-clone the repo.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,945 views 7 10
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you