Forking

On occasion you'll want to fork a repo, here's how. I'll use the edmondscommerce-serversetup repo as an example.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Clone the existing repo
git clone gitBare:repos/edmondscommerce-serversetup
cp edmondscommerce-serversetup <client name>-serversetup
cd <client name>-serversetup

# Create a new bare repo
ssh gitBare
mkdir -p repos/<client name>/<client name>-serversetup
cd repos/<client name>/<client name>-serversetup
git init --bare
exit

# Update origin
git remote rm origin
git remote add origin gitBare:repos/<client name>/<client name>-serversetup
git push origin master
# That's it!