Usually, rsync is used to synchronize one local directory to/from one remote directory. But sometimes, because two hosts cannot see each other directly, one cannot log into one host and rsync to from the other. The solution is to find a third host that can see both hosts and then sync them. Unfortunately, rsync accepts only one remote host. The…
Category: Uncategorized
How to add existing project to git and configure remote repository
You already started a new project, but it is not under GIT yet. No problem, let’s create a local repository dedicated to your project :
1 2 3 4 |
cd your_project_dir git init git add . git commit -m 'first commit' |
Et voilĂ . Now, in order to have the project available everywhere, you can configure a remote GIT repository. You first have to log into your remote host and configure a new repository :
1 2 3 |
ssh my_user@my_remote_host cd all_projects_repo_dir (or create an empty one) git init --bare my_project.git |
…