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 |
Now, go back to your local project directory and configure remote url and then push your project :
1 2 |
git remote add origin ssh://my_user@my_host/home/my_user/all_projects_repo_dir/my_project git push -u origin master |
That’s all.