\giT\
Distributed Version Control System
(http://slid.es/shivekkhurana/git)
IS this similar to your code directory ?
index.html
index2.html
index-temp.html
index_new.html
style.css
style-old.css
style-oct-12-uodated.css
Imagine the same with 100+ file application !
How (the f##k) do you manage, collaborate, debug, a project like that ?
Linus Torvalds fixed this
by creating a sub-version control system called git for developing linux & then made it open source for other developers to manage their projects.
with git your directory will look like
index.html
style.css
With all sub versions being stored in the background
Let's get started
download and install git on your platform.
surface area and volume calculator
- choose a programming language
- find someone with same choice
- sit with him/her
parts of the program
divide parts among yourselves
Workshop outline
- config
- init
- status
- add
- commit
- reset
- remote
- pull
- push
- log
git config
git config --global user.name "Shivek Khurana"
git config --global user.email s@s.ss
git init
convert a directory into repository
Create you file
touch main.py
touch main.js
touch (whatever)
GIt status
lists the unsaved changes and untracked objects in your repo
git add
stage your files to be commited
git commit
save staged files as "snapshots" and can be accessed, modified and switched
git status again
notice the message
"nothing to commit, working directory clean"
git reset
just in case you didn't like the change you commmited, you can go back by typing :
git reset HEAD ^
git remote
git remote connects your local repo with those of collaborators
github is not equal to git
github is a service to host git remotes
git pull
so you are up to date