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

This widget could not be displayed.

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 Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,258 views 8 11
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