GitList
Repositories
Help
Report an Issue
personalization
Code
Commits
Branches
Tags
Search
Tree:
f7c5078
Branches
Tags
master
personalization
sharedHost
newgit
initial commit... starting with a structure on which i hope to expand.
Dev Ghai
commited
f7c5078
at 2014-01-22 21:53:02
newgit
Blame
History
Raw
# http://blog.mornati.net/2011/09/15/create-git-repository-on-shared-host/ newgit() { if [ -z $1 ]; then # echo "usage: $FUNCNAME project-name ['description with spaces']" echo "usage: $FUNCNAME project-name" else repoRoot="repos" website="devghai.com" user="devghaic" gitdir="$HOME/$repoRoot/$1" mkdir $gitdir pushd `pwd` cd $gitdir git --bare init git --bare update-server-info cp hooks/post-update.sample hooks/post-update chmod a+x hooks/post-update # if [ -z $2 ]; then # echo $2 > description # fi echo "----------------------------------------------------------------------------------------------------" echo "| Credit: Marco Mornati @ http://blog.mornati.net/2011/09/15/create-git-repository-on-shared-host/ |" echo "----------------------------------------------------------------------------------------------------" echo "Clone repository using: " echo "$ git clone ssh://$user@$website$gitdir" echo "" echo "While committing for the first time..." echo "$ git add ." echo "$ git commit . -m 'initial commit'" echo "$ git push origin master" echo "" echo "Please edit $gitdir/description to add some intro about the repo." echo "====================================================================================================" popd fi }