Difference between revisions of "Git -- new repository setup"
Jump to navigation
Jump to search
(Git topic text added) |
(Comment) |
||
Line 1: | Line 1: | ||
Note that the URL in my case is defined via ~/.ssh/config. I write it directly into .../[repo]/.git/config. | |||
On server: | On server: |
Revision as of 11:45, 6 March 2023
Note that the URL in my case is defined via ~/.ssh/config. I write it directly into .../[repo]/.git/config.
On server:
mkdir my_project.git
cd my_project.git
git --bare init
On client:
mkdir my_project
cd my_project
touch .gitignore
git init
git add .
git commit -m "Initial commit"
git remote add origin youruser@yourserver.com:/path/to/my_project.git
git push origin master
[https://stackoverflow.com/questions/2337281/how-do-i-do-an-initial-push-to-a-remote-repository-with-git]