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…