Last active
May 18, 2020 21:26
-
-
Save dmgl/645caeb1aa6557eef5dd835a0f643f2b to your computer and use it in GitHub Desktop.
Instructions for making git repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a bare repository on the server side. | |
cd ~/Projects; sudo -u pi mkdir -m 770 project.git | |
cd project.git; sudo -u pi git --bare init --shared=group | |
# From client side the developer’s project must be pushed into the new bare server repository: | |
# First, create a new local git repository and add all files within this folder. | |
cd dir_with_files; git init; git add .; git commit -m "creation repo" | |
git remote add origin ssh://pi@address:port/home/pi/Projects/project.git | |
# Check origin | |
git remote show origin | |
# If mistakes in url | |
git remote set-url origin ssh://user@address:port/path/project.git | |
# If need to remove remote | |
git remote remove <name> | |
# Then push | |
git push origin master | |
# Or push all branches | |
git push --all origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note