Created
May 20, 2017 10:36
-
-
Save gokman/b73355a19a2ac066791c7994d584c514 to your computer and use it in GitHub Desktop.
create bare git repository
This file contains hidden or 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 folder | |
| mkdir {git repo folder} | |
| Ex: mkdir /opt/myrepo | |
| #initialize git repository | |
| git init --bare {git repo name}.git | |
| Ex: git init --bare myrepo.git | |
| #create git remote address | |
| git remote add {remote name} {bare repository address}:{folder}/{git repo name}.git | |
| Ex: git remote add myremote user@0.0.0.0:/opt/myrepo/myrepo.git | |
| #push your changes to the newly created bare repo | |
| git push {remote name} {branch name} | |
| Ex: git push myremote master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment