How to initialize a remote Git repository
Well, since it took me all day to figure this out again, I figured I might as well write it down somewhere so that at least I’ll be able to remember it the next time I want to create a new repo with Git.
The one thing that irks me is that I always try to create a bare repo on the server and then clone it to my client. For some reason git doesn’t want to work this way even though that’s what my intuition tells me.
Anyway, the way to do it is to first create your working copy. I’m making a little website so I have some code in /www/my-working-copy. After you have some code that you want in the repo, you need to initialize a git repository and add your code to it like so:
git add .
After that’s done, you want to go your git-daemon’s base path and clone this repo there with a bare copy:
You should get a message like “Initialized empty Git repository in /my-git-daemon-base-path/my-remote-repo/” after which you may need to run update-server-info and you’ll also want to add a ‘git-daemon-export-ok’ file to the repo so that the daemon knows that it is okay to export it:
cd /my-git-daemon-base-path/my-remote-repo && touch git-daemon-export-ok
At this point you also will most likely want to add a ‘tracked repository’ named ‘origin’ to your working copy so that git will know where you want to push and pull from:
That’s it! To test it out simply try a commit:
You should receive a message “nothing to commit (working directory clean)”.
At this point you probably want to push your changes to the repo. Although the repo is created, it won’t be very useful until there’s something in it:
Cheers!
Tags: git, how to, initialize, repo, repository
172 Responses to “How to initialize a remote Git repository”
July 15th, 2011 at 4:27 pm
buy@generic.VIAGRA” rel=”nofollow”>……
Need cheap generic VIAGRA?…
July 17th, 2011 at 7:52 am
buy@generic.LEVITRA” rel=”nofollow”>……
Need cheap generic LEVITRA?…
July 28th, 2011 at 11:14 pm
Order@Coral.Calcium.Online” rel=”nofollow”>..…
Buygeneric pills…
July 29th, 2011 at 1:38 am
Purchase@Cheap.Coral.Calcium” rel=”nofollow”>..…
Buynow it…
July 29th, 2011 at 3:42 am
Buy@Cheap.Abana” rel=”nofollow”>..…
Buygeneric pills…
July 29th, 2011 at 8:45 am
Get@Abana.Online” rel=”nofollow”>..…
Buyit now…
July 29th, 2011 at 9:11 am
Buy@Abilify.Online” rel=”nofollow”>..…
Buygeneric meds…
July 29th, 2011 at 9:44 am
Buy@Cheap.Abilify” rel=”nofollow”>..…
Buynow it…
July 29th, 2011 at 12:36 pm
Purchase@Abilify.Online” rel=”nofollow”>……
Buywithout prescription…
July 29th, 2011 at 2:13 pm
Get@Abilify.Online” rel=”nofollow”>..…
Buygeneric drugs…
July 29th, 2011 at 5:53 pm
Cheap@Abilify.Without.Prescription” rel=”nofollow”>.…
Buynow it…
July 29th, 2011 at 6:43 pm
Buy@Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>..…
Buyno prescription…
July 29th, 2011 at 7:27 pm
Buy@Generic.Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>……
Buywithout prescription…
July 30th, 2011 at 2:26 pm
Purchase@Discount.Acai” rel=”nofollow”>..…
Buywithout prescription…
July 30th, 2011 at 4:16 pm
Cheap@Acai.Online” rel=”nofollow”>……
Buynow…
July 31st, 2011 at 10:41 pm
Buy@Coral.Calcium.Online” rel=”nofollow”>.…
Buygeneric meds…
July 31st, 2011 at 11:04 pm
Buy@Cheap.Coral.Calcium” rel=”nofollow”>……
Buygeneric meds…
August 1st, 2011 at 10:03 am
Order@Cheap.Abilify” rel=”nofollow”>..…
Buyno prescription…
August 3rd, 2011 at 12:46 pm
Buy@Cheap.Acai” rel=”nofollow”>……
Buygeneric drugs…
August 3rd, 2011 at 1:55 pm
Buy@Cheap.Acai” rel=”nofollow”>.…
Buywithout prescription…
August 3rd, 2011 at 2:12 pm
Buy@Cheap.Acai” rel=”nofollow”>……
Buygeneric drugs…
August 3rd, 2011 at 4:09 pm
Order@Acai.Online” rel=”nofollow”>……
Buyit now…
August 3rd, 2011 at 4:41 pm
Order@Acai.Online” rel=”nofollow”>……
Buygeneric drugs…
August 3rd, 2011 at 5:09 pm
Order@Acai.Online” rel=”nofollow”>……
Buynow it…
August 3rd, 2011 at 5:17 pm
Order@Acai.Online” rel=”nofollow”>……
Buyit now…
August 3rd, 2011 at 7:08 pm
Order@Discount.Acai” rel=”nofollow”>……
Buynow…
August 5th, 2011 at 3:34 am
Order@Discount.Energy.Boost” rel=”nofollow”>.…
Buynow it…
August 5th, 2011 at 6:58 am
Purchase@Discount.Energy.Boost” rel=”nofollow”>.…
Buynow it…
August 5th, 2011 at 11:28 am
Buy@Cheap.Accupril” rel=”nofollow”>.…
Buygeneric meds…
August 5th, 2011 at 12:33 pm
Buy@Discount.Accupril” rel=”nofollow”>.…
Buyno prescription…
August 5th, 2011 at 1:36 pm
Order@Accupril.Online” rel=”nofollow”>.…
Buygeneric drugs…
August 5th, 2011 at 4:55 pm
Purchase@Accupril.Online” rel=”nofollow”>.…
Buygeneric drugs…
August 6th, 2011 at 12:59 am
Buy@Discount.Accutane” rel=”nofollow”>.…
Buynow it…
August 6th, 2011 at 3:14 am
Order@Cheap.Accutane” rel=”nofollow”>.…
Buygeneric drugs…
August 7th, 2011 at 3:48 am
Buy@Cheap.Aciphex” rel=”nofollow”>.…
Buygeneric meds…
August 8th, 2011 at 9:14 am
Cheap@Aciphex.Without.Prescription” rel=”nofollow”>.…
Buynow it…
August 9th, 2011 at 12:35 am
Buy@Acomplia.Online” rel=”nofollow”>.…
Buynow it…
August 10th, 2011 at 3:33 pm
Cheap@Actonel.Without.Prescription” rel=”nofollow”>……
Buynow it mou…
August 10th, 2011 at 3:58 pm
Cheap@Actonel.35mg” rel=”nofollow”>……
Buyit now oil…
August 10th, 2011 at 6:12 pm
Cheap@Generic.Actonel.35mg” rel=”nofollow”>..…
Buygeneric meds qmo…
August 11th, 2011 at 8:02 am
Get@Actos.Online” rel=”nofollow”>..…
Buywithout prescription dyo…
August 11th, 2011 at 1:26 pm
Order@Actos.Without.Prescription” rel=”nofollow”>..…
Buygeneric pills zdg…
August 12th, 2011 at 12:38 am
Cheap@Generic.Actos.15mg.30mg” rel=”nofollow”>.…
Buygeneric drugs zfk…
August 12th, 2011 at 11:51 am
Order@Cheap.Adalat” rel=”nofollow”>..…
Buygeneric drugs lzt…
August 12th, 2011 at 12:53 pm
Purchase@Adalat.Online” rel=”nofollow”>.…
Buyno prescription luw…
August 12th, 2011 at 8:55 pm
Cheap@Coral.Calcium.Online” rel=”nofollow”>……
Buywithout prescription xiu…
August 13th, 2011 at 12:20 pm
Buy@Generic.Abilify.Without.Prescription” rel=”nofollow”>..…
Buynow it tly…
August 14th, 2011 at 2:55 am
Order@Cheap.Acai” rel=”nofollow”>..…
Buyno prescription gdt…
August 14th, 2011 at 10:51 am
Buy@Generic.Acai” rel=”nofollow”>.…
Buygeneric drugs mby…
August 14th, 2011 at 6:25 pm
Cheap@Generic.Acai” rel=”nofollow”>……
Buydrugs without prescription vrg…
August 14th, 2011 at 7:40 pm
Cheap@Acai.Without.Prescription” rel=”nofollow”>……
Buydrugs without prescription jlg…
August 15th, 2011 at 2:33 am
Generic@Acai.500mg.Without.Prescription” rel=”nofollow”>..…
Buyno prescription wkp…
August 15th, 2011 at 8:02 am
Buy@Discount.Energy.Boost” rel=”nofollow”>.…
Buygeneric drugs itj…
August 15th, 2011 at 7:07 pm
Buy@Cheap.Accupril” rel=”nofollow”>.…
Buygeneric drugs nih…
August 15th, 2011 at 10:50 pm
Order@Cheap.Accupril” rel=”nofollow”>.…
Buynow it fnp…
August 16th, 2011 at 8:52 am
Cheap@Accupril.Online” rel=”nofollow”>..…
Buygeneric drugs ajd…
August 16th, 2011 at 7:52 pm
Order@Accutane.Online” rel=”nofollow”>……
Buyit now sge…
August 16th, 2011 at 9:02 pm
Order@Cheap.Accutane” rel=”nofollow”>..…
Buyno prescription tao…
August 17th, 2011 at 12:00 am
Purchase@Cheap.Accutane” rel=”nofollow”>……
Buywithout prescription ccw…
August 17th, 2011 at 2:53 pm
Cheap@Accutane.10mg.20mg” rel=”nofollow”>.…
Buyit now ojb…
August 17th, 2011 at 4:04 pm
Buy@Accutane.10mg.20mg” rel=”nofollow”>……
Buynow it zdg…
August 18th, 2011 at 2:05 am
Order@Aciphex.Online” rel=”nofollow”>.…
Buynow it lmg…
August 18th, 2011 at 3:13 am
Order@Cheap.Aciphex” rel=”nofollow”>..…
Buydrugs without prescription faj…
August 18th, 2011 at 4:30 am
Order@Discount.Aciphex” rel=”nofollow”>……
Buygeneric meds svb…
August 18th, 2011 at 8:08 am
Purchase@Discount.Aciphex” rel=”nofollow”>..…
Buyno prescription jui…
August 21st, 2011 at 12:22 am
Purchase@Discount.Acomplia” rel=”nofollow”>..…
Buynow it sgk…
August 21st, 2011 at 4:59 am
Buy@Actonel.Online” rel=”nofollow”>..…
Buydrugs without prescription hak…
August 21st, 2011 at 3:54 pm
Purchase@Actonel.Online” rel=”nofollow”>……
Buygeneric drugs vbr…
August 21st, 2011 at 5:14 pm
Purchase@Cheap.Actonel” rel=”nofollow”>.…
Buydrugs without prescription xab…
August 22nd, 2011 at 9:26 pm
Order@Advair.Online” rel=”nofollow”>..…
Buyit now irl…
August 23rd, 2011 at 12:07 pm
Buy@Generic.Advair” rel=”nofollow”>.…
Buygeneric drugs ouw…
August 23rd, 2011 at 1:26 pm
Buy@Advair.Without.Prescription” rel=”nofollow”>.…
Buygeneric drugs hwi…
August 24th, 2011 at 12:50 pm
< a href=”http://trig.com/advair5771/biography/?ml=Advair-25mcg/50mcg-25mcg/125mcg-25mcg/250mcg-50mcg/500mcg-50mcg/100mcg-50mcg/250mcg-Without-Prescription Advair@25mcg50mcg.25mcg125mcg.25mcg250mcg.50mcg500mcg.50mcg100mcg.50mcg250mcg.Without.Pr…
Buydrugs without prescription ygy…
August 24th, 2011 at 3:31 pm
Buy@Cheap.Aggrenox” rel=”nofollow”>..…
Buygeneric meds dxy…
August 25th, 2011 at 3:31 am
Get@Aggrenox.Online” rel=”nofollow”>……
Buynow fjl…
August 25th, 2011 at 10:11 am
Order@Cheap.Albenza” rel=”nofollow”>……
Buynow it sxk…
August 25th, 2011 at 2:12 pm
Purchase@Cheap.Albenza” rel=”nofollow”>……
Buyit now knc…
August 26th, 2011 at 8:35 am
can@you.take.aciphex.and.nexium.at.the.same.time” rel=”nofollow”>..…
Buygeneric pills…
August 26th, 2011 at 8:34 pm
actonel@and.heart.irregularities” rel=”nofollow”>..…
Buyno prescription…
August 26th, 2011 at 9:48 pm
.…
Buynow…
August 26th, 2011 at 11:15 pm
advair@copd.advertising.campaign” rel=”nofollow”>..…
Buynow…
August 27th, 2011 at 2:32 am
aldactone@kidney.problems” rel=”nofollow”>……
Buygeneric drugs…
August 27th, 2011 at 4:34 pm
buy@amoxicillin.500mg” rel=”nofollow”>.…
Buynow it…
August 28th, 2011 at 12:34 am
risperdal@vs.abilify” rel=”nofollow”>.…
Buygeneric drugs…
August 28th, 2011 at 8:15 am
accutane@verdict.buy” rel=”nofollow”>..…
Buydrugs without prescription…
August 28th, 2011 at 10:54 am
actonel@and.dvt” rel=”nofollow”>.…
Buygeneric meds…
August 28th, 2011 at 2:46 pm
adalat@asus.buy” rel=”nofollow”>.…
Buydrugs without prescription…
August 28th, 2011 at 4:14 pm
allegra@generic.purchase” rel=”nofollow”>……
Buynow…
August 28th, 2011 at 5:34 pm
allopurinol@atrial.fibrillation” rel=”nofollow”>.…
Buygeneric pills…
August 29th, 2011 at 6:55 am
arimidex@or.nolvadex.steriods” rel=”nofollow”>..…
Buywithout prescription…
August 29th, 2011 at 11:01 am
artane@bending.over” rel=”nofollow”>.…
Buynow…
September 16th, 2011 at 12:18 pm
……
Search music now US Charts…
October 16th, 2011 at 10:32 pm
levaquin 500mg…
Buy_no prescription…
October 17th, 2011 at 12:38 am
sleep aids and half-life…
Buy_it now…
October 17th, 2011 at 3:38 pm
norvasc and theophylline…
Buy_drugs without prescription…
October 17th, 2011 at 6:59 pm
c-section scar pain symptoms pregnancy…
Buy_generic drugs…
October 18th, 2011 at 6:15 am
adhd drugs causing hallucinations…
Buy_generic meds…
October 18th, 2011 at 4:15 pm
over the counter birth control…
Buy_generic meds…
October 19th, 2011 at 8:55 am
steroids abuse sexual dysfunction…
Buy_it now…
October 19th, 2011 at 12:15 pm
hiv aids in california in 1997…
Buy_generic pills…
October 19th, 2011 at 1:55 pm
impact rating journal of clinical psychology…
Buy_now it…
October 20th, 2011 at 2:56 am
birth control pills for pms symptoms…
Buy_drugs without prescription…
October 20th, 2011 at 6:16 am
number of obese in this generation…
Buy_generic meds…
October 20th, 2011 at 7:56 am
aspirin pain relief dog…
Buy_drugs without prescription…
October 20th, 2011 at 9:37 am
financial aid for alzheimer’s…
Buy_without prescription…
October 20th, 2011 at 2:36 pm
otc proton pump inhibitors…
Buy_no prescription…
October 20th, 2011 at 5:56 pm
heart worm medication…
Buy_no prescription…
October 21st, 2011 at 2:47 am
drug alcohol prevention resilience…
Buy_it now…
October 21st, 2011 at 4:27 am
viagra in the uk…
Buy_no prescription…
October 21st, 2011 at 7:26 pm
rapid weight loss…
Buy_generic drugs…
October 21st, 2011 at 10:47 pm
blood pressure medications…
Buy_now it…
October 22nd, 2011 at 2:08 am
cheap travel nebulizer…
Buy_generic drugs…
October 22nd, 2011 at 8:47 am
what are three effects of obesity…
Buy_it now…
October 22nd, 2011 at 12:50 pm
arimidex and marathon…
Buy_generic drugs…
October 22nd, 2011 at 5:51 pm
xanax and pregnancy…
Buy_generic pills…
October 25th, 2011 at 3:28 am
good and bad drugs…
Buy_without prescription…
October 25th, 2011 at 5:08 am
is hepatitis b contagious…
Buy_generic pills…
October 25th, 2011 at 11:48 am
drug rehab center british columbia…
Buy_generic drugs…
October 25th, 2011 at 4:47 pm
research being done to treat hiv…
Buy_generic pills…
October 25th, 2011 at 6:28 pm
hepatitis b shot…
Buy_it now…
October 26th, 2011 at 2:49 am
drug trafficking in latin america…
Buy_drugs without prescription…
October 26th, 2011 at 9:08 pm
serotonin natural sources…
Buy_generic meds…
October 28th, 2011 at 8:08 am
terbutaline autism claim…
Buy_no prescription…
October 28th, 2011 at 9:48 am
iv zofran…
Buy_drugs without prescription…
October 28th, 2011 at 11:27 am
planar warts…
Buy_drugs without prescription…
October 28th, 2011 at 2:50 pm
dhea treatment of depression…
Buy_drugs without prescription…
October 29th, 2011 at 3:21 am
permanent removal of adult acne scars…
Buy_generic meds…
October 29th, 2011 at 3:01 pm
pregnancy issues with men…
Buy_no prescription…
October 30th, 2011 at 6:47 am
enhancement drugs…
Buy_no prescription…
October 30th, 2011 at 4:44 pm
does birth control control moods…
Buy_generic drugs…
October 30th, 2011 at 6:24 pm
drug test company…
Buy_without prescription…
October 30th, 2011 at 8:05 pm
chf vs pulmonary edema…
Buy_generic drugs…
October 31st, 2011 at 7:25 pm
weight loss tricks for 40 somethings…
Buy_drugs without prescription…
November 1st, 2011 at 5:25 am
stop smoking phlegm…
Buy_drugs without prescription…
November 2nd, 2011 at 9:45 am
epson salt and lemon juice diet…
Buy_generic pills…
November 3rd, 2011 at 2:26 am
sandwich elisa for hepatitis b…
Buy_generic meds…
November 3rd, 2011 at 4:06 am
how to buy glucose meter…
Buy_generic meds…
November 3rd, 2011 at 9:51 am
skin cancer foundation australia…
Buy_generic drugs…
November 3rd, 2011 at 11:31 am
what foods anorexia eat…
Buy_drugs without prescription…
November 4th, 2011 at 4:13 am
psychostimulant treatment of depression…
Buy_drugs without prescription…
November 4th, 2011 at 7:33 am
copd lung sounds…
Buy_it now…
November 4th, 2011 at 12:33 pm
colon cancer lymph node…
Buy_without prescription…
November 4th, 2011 at 3:53 pm
cipro for sinus infection…
Buy_generic meds…
November 5th, 2011 at 4:30 am
images of tongue cancer…
Buy_generic meds…
November 5th, 2011 at 9:10 pm
nexium pepsin ac…
Buy_generic drugs…
November 6th, 2011 at 3:50 am
depression medcine xr…
Buy_drugs without prescription…
November 7th, 2011 at 8:11 am
will the recession become a depression…
Buy_without prescription…
November 7th, 2011 at 9:50 am
azithromycin doxycycline over the counter…
Buy_generic pills…
November 7th, 2011 at 11:30 am
forensic drug test swab…
Buy_no prescription…
November 7th, 2011 at 1:10 pm
teen girl 16 18.6 bmi…
Buy_generic drugs…
November 8th, 2011 at 6:19 am
seed implant for prostate cancer…
Buy_drugs without prescription…
November 8th, 2011 at 7:59 am
acne scar and pit lamp…
Buy_generic drugs…
November 8th, 2011 at 10:04 am
school age adhd self absorbed…
Buy_now it…
November 9th, 2011 at 9:24 am
synephrine hcl diet pills…
Buy_generic pills…
November 10th, 2011 at 2:04 am
adult male wheezing new onset…
Buy_drugs without prescription…
November 10th, 2011 at 8:24 pm
terry abbot…
Buy_generic drugs…
November 11th, 2011 at 4:24 pm
meal plan for hypertension…
Buy_generic drugs…
November 11th, 2011 at 6:04 pm
how to make glucose water…
Buy_it now…
November 11th, 2011 at 9:24 pm
dr loss phil ultimate weight…
Buy_no prescription…
November 12th, 2011 at 2:04 pm
indomethacin opthalmic drops…
Buy_generic pills…
November 12th, 2011 at 3:44 pm
scabies in dogs help…
Buy_generic drugs…
November 12th, 2011 at 10:24 pm
hormone shot for prostate cancer…
Buy_generic drugs…
November 13th, 2011 at 6:44 am
benicar hct and norvasc…
Buy_it now…
November 13th, 2011 at 3:04 pm
tobacco alternatives herbal…
Buy_generic drugs…
November 16th, 2011 at 12:02 am
prozac overdose and tardive dyskinesia…
Buy_generic meds…
November 16th, 2011 at 8:22 am
black molley slang drug name…
Buy_generic drugs…
November 16th, 2011 at 8:02 pm
diet secrets for models…
Buy_now it…
November 17th, 2011 at 2:42 am
children during the depression…
Buy_drugs without prescription…
December 9th, 2011 at 11:22 am
canadian@pharmacy.valtrex” rel=”nofollow”>……
Buygeneric meds…
December 10th, 2011 at 3:38 pm
indications@for.use.of.atrovent” rel=”nofollow”>……
Buygeneric meds…
December 11th, 2011 at 9:28 am
best@medicare.plan.d.for.nexium.40.mg” rel=”nofollow”>..…
Buygeneric meds…
December 11th, 2011 at 1:44 pm
infant@prevacid.dose” rel=”nofollow”>.…
Buygeneric drugs…
Leave a Reply