When you works with Git, you use Github or Gitlab for clones. But it is possible to do a clone on server...

I already give you a solution [FR] to do it with Tortoise Git.

Here is the solution if you use an unix environment (MacOS, Linux...).

Server configuration

First, ensure that:

  • Your Git repository is configured on the server (chapter 2 of this article [FR])
  • You have a SSH connection with you server, and the local Git client is correctly configured linked to the remote.

Solution

Execute the following commands:

mkdir MyProject
cd MyProject
git init
git remote add origin user@server.ext:repositories/MyProject.git

And now, you can do push, pull and fecth on the remote repository origin. :)

To get the commits of the remote branch, you shall do a pull.

See you in the next article. xD


Related topics:

Previous Post Next Post


Add a comment