Create a shared Git Repository


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ### SERVER
  2. cd /path/to/your/git/repo/dir
  3.  
  4. mkdir my_repo.git
  5. cd my_repo.git
  6.  
  7. git --bare init --shared
  8.  
  9. #fetch git repositoy into shared git repository
  10. git --bare fetch /my/exists/git_repo master:master
  11.  
  12. ### WORKSTATION
  13. git clone ssh://user@server:sshport//path/to/your/git/repo/dir/my_repo.git my_repo

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.