title | author | date | output |
---|---|---|---|
Setting up git on local Synology |
Mourad Veeneman |
November 3, 2018 |
html_document |
This is how I set up my private repository on my own Synology drive. You will need to have the Git application installed and SSH enabled for your synology user.
Create the git repository on your laptop:
cd <project folder>
git init
git add *
vi .gitignore
git add .gitignore
git commit
Log on to Synology with SSH to create the repository:
mkdir <projectname>.git
cd <projectname>.git
git init --bare
Now go back to your laptop and point git to your new repository:
git remote add origin ssh://<user>@<hostname>:<port>/~/<projectname>.git
git push --set-upstream origin master