- Ensure you can
ssh user@targetserver
successfully- Public/private keys are a smart choice here
- On
targetserver
- Example here assumes all Git repository users are members of a
gitusers
group, adjust to suit mkdir -p ~/path/to/repository
cd ~/path/to/repository
git init --bare --shared=group
- Switch
--shared=group
will addcore.sharedrepository = 1
to the repositories~/path/to/repository/config
file
- Switch
chgrp -R gitusers ~/path/to/repository
- All done on
targetserver
- Example here assumes all Git repository users are members of a
- Now on development machine lets push working copy
mkdir -p ~/my/new/working/copy
cd ~/my/new/working/copy
git init
touch somefile.txt
git add .
git commit -m 'Initial commit'
git remote add origin user@targetserver:path/to/repository
git push -u origin master
git fetch
git pull
-
-
Save onel0p3z/5698762 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment