Creating a Central GIT Repo from Scratch

Achtung-Achtung! Nerdy GIT article yet again – You have been warned

Alas I discovered that I had forgot to put my TypeScript Code under wraps in a repository, so away I went to make a new repo, so I after some attempts I made a new repo using this command:

git –bare init –shared TypeScriptCode.git

This created a ready bare repository I intended to use as my central repository.

Next step was to create a place where I could work with my code. So:

cd ~/Work
git clone file:///home/carsten/GitOrigins/TypeScriptCode
cd TypeScriptCode/

Then I copied the code from where I had the original directories from my typescript work on amongst other things the Asteroids Clone, and after that started to add stuff:

echo ‘*/built/*’ > .gitignore
git add .gitignore
git add AsteroidsGame/*.js
git add AsteroidsGame/*.ts
git add AsteroidsGame/*.html
git add AsteroidsGame/*.json
git add AsteroidsGame/resources/
git add AsteroidsGame/sound
git add CommonLib/*.ts
git commit -m “Initial Checkin”
git push

And then I was started, I added the rest and after some testing, now I have a central repository for my typescript code…

Author: Carsten Schwartz

My name is Carsten Schwartz. I live in Stevnstrup, Denmark . I develop Apps and Computer Games. I play board games and I am an experienced GM in Warhammer Fantasy Role Play (1st and 2nd Ed). I am also painting and sculpting miniatures. Yes that's right I am a freak - No mistake there, I even exercise Ju-Jitsu twice a week too. I am using this media to track my work and organize it a little.

Leave a Reply

Your email address will not be published. Required fields are marked *