skip to Main Content

I have a repository that is currently hosted on BitBucket, that I want to move to Git cPanel version control (run by my hosting company), so I can then delete my account on BitBucket and host all my repositories in a single location.
I do not want to have any links/ties to the original BitBucket repository, but I do need to retain all of the repository history.

I did try…
git push -u origin master
…but this made me nervous…
branch ‘master’ set up to track ‘origin/master’.

Is this possible, and if so, how?

2

Answers


  1. You must first change your origin remote url with the new cPanel one

    git remote set-url origin <new-cpanel-gitrepo-url>
    

    And then push like you were doing before

    Login or Signup to reply.
  2. first, to retain the only certain number of commits, you can use either

    git merge --interactive or --squash, all data about it can be found here.

    second, to push to Cpanel you add it either by adding new remote to your remote

    git remote add <your-remote-name> <url of your cpanel>

    or changing the url of the origin remote you added by

    git remote set-url origin <url of cpanel>

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search