Pacific-Design.com

    
Home Index

1. Git

2. Repositoty

Git / Repositoty /

Initalize Git Server Repository

#!/bin/bash
#---------------------------------------#
# Initalize Git Repository
#---------------------------------------#
cd ~ 
mkdir ${1}.git
cd ${1}.git
git init --bare

Initalize Git Client Repository

#!/bin/bash
#--------------------------------------------------------#
# Initialize Client Repository
#--------------------------------------------------------#
IP=${1}
REPO=${2}

git init
git remote add origin git@${IP}:/home/git/${REPO}.git
git push origin master