Cloning hosting folder for bitbucket

0

How do I clone a folder that is in my host on the hostgator for a project in BitBucket and after the changes go up to the hostgator again? Is it possible?

Note: I have the ssh access from the hostgator and I can access the ssh terminal normally.

    
asked by anonymous 25.03.2018 / 23:10

1 answer

3

The simplest way to transfer a repository from one host to another is:

  • Clone the repository you want to move on your machine
  • Create an empty repository on the other host in the BitBucket case
  • Add the remote from the new repository to the repository you cloned on your machine

    git remote -add [remote-name] [URL]

  • Remember, there must already be at least one "origin", since you cloned the repository in step 1, so do not use that name.

  • I sent everything there with:

    git push [remote-name] --all

  • 26.03.2018 / 16:35