Skip to content

Instantly share code, notes, and snippets.

@mveeneman
Last active November 27, 2018 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mveeneman/307183c0ec3bf439db48fe0d12f51657 to your computer and use it in GitHub Desktop.
Save mveeneman/307183c0ec3bf439db48fe0d12f51657 to your computer and use it in GitHub Desktop.
title author date output
Setting up git on local Synology
Mourad Veeneman
November 3, 2018
html_document

Git on local Synology

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment