Reputation: 432
I created several version of a project and saved them on my local Linux (to keeping the track). Then I got familiar with bit-bucket, so I want to create a repository in bit-bucket and add all old version one by one to the repository and keep their order.
I tried to push versions one by one but they cannot be pushed as master, they should be pushed as origin then I couldn't merge them to master. so then I have a lot of branches in repository those cannot merge to master or together.
How to this to make the project looks like created in a path during time?
The project is in Java and I named each version as project 1.0, 1.1 ... ,5.14 I used Git.
The expected result is something like this picture but when I push them the plan path does not appear at the left of each branch.
Upvotes: 0
Views: 1341
Reputation: 8170
I think that what you need is to create branches also in the upstream environment (not forked repo).
BitBucket (upstream)
- master
- version1
- version2
- version3
BitBucket (forked repo)
- master
- version1
- version2
- version3
When pushing to your forked repo you just need to use
git push origin <branch>
and if the branch is not created it will create it.
For every version you will be executing this command with the branch name desired for the version.
Upvotes: 0
Reputation: 2453
Push your 'original' master up to bitbucket. Copy your next version directory, but overwrite the files you previously pushed, instead of trying to push a different directory in to the same repo. Overwritting the files with the next version is the same effect as if you hand modified them during development. Once you have overwritten your 'original' files with your 2nd version files, push all the files up to bitbucket again. Your second 'version' should now be a change set.
Rinse and repeat until you have gone through all your previous versions. There may be a faster way, but this shouldn't take too terribly long if you only have a few versions.
This only works if you do not care about keeping the version directory structure, and only want changesets. If you want to upload your entire version folder structure, just move all your versions into your .git repo directory and push them up at the same time.
Upvotes: 1