Juri Goes GIT - First Steps
4 min read
4 min read
Yes, I'm going "git" ;). An inherent part of structured, well organized working is to have your stuff under version control (1st point on the Joel Test). I remember when I first got in touch with version control, the first year at the university and I was impressed. Cool I thought, a central repo, easy collaboration, change history etc. And still, I saw many students continuing to send code files over mail... Since that, a lot changed and version control became self-evident in software development.
Recently distributed version control systems became more popular. Actually they're now around already for a while and yes I know, I'm late to give them a first change only now, but you know... time is rare ;). Anyway, I was already curious to give it a try for a while, so I decided to dedicate a couple of hours to setup git repositories for my "prototyping" stuff and document my first steps here for the late-adopters out there as myself. With "prototyping" stuff I mean my code trials, tech experiments and so on. Till now I simply hosted them inside a folder on Dropbox which automatically gives you basic versioning (30 days back), but it is never as convenient as a fully functional SCM system.
JurisMacBookPro:~ Juri$ cd ~/programming/prototyping
JurisMacBookPro:prototyping Juri$ git init
JurisMacBookPro:prototyping Juri$ git add .
JurisMacBookPro:prototyping Juri$ git commit -a -m "Initial commit"
JurisMacBookPro:prototyping Juri$ git clone --bare . ~/Dropbox/gitrepos/prototyping.git
JurisMacBookPro:prototyping Juri$ git remote add prototyping ~/Dropbox/gitrepos/prototyping.gitIt's done. On another workstation (or another person you'd like to share the repo with) can now clone your repository
git clone ~/Dropbox/gitrepos/prototyping.gitOf course the repository needs to be either placed on your public Dropbox folder or it must be shared with the desired user.
git remote add prototyping ~/Dropbox/gitrepos/prototyping.git
Note, the same might also work by using simple SVN repositories instead of Git. I didn't try it, but nothing comes to my mind why that shouldn't work the same.
|Original image here|