Advertisement
wolkchen

bare-git

Feb 23rd, 2023
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | Software | 0 0
  1. #/bin/sh
  2.  
  3. # Makes repository with name passed as first arg
  4.  
  5. # Vars
  6. repo=$1
  7. base="/home/git/repos"
  8.  
  9. echo "making repo with name ${repo}"
  10.  
  11. # Make repo directory
  12. rdir="${base}/${repo}.git"
  13. mkdir ${rdir}
  14. cd ${rdir}
  15.  
  16. # Make bare repo
  17. git init --bare
  18.  
  19. # Add remote
  20. git remote add origin git@DATA-SERVER:${rdir}
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement