Overview
• What is Version Control System?• Why should we care for VCS?• What is git?• git Architecture• What is Source Tree?• Working with git using Source Tree• Working with git using Commands• Hands-on
What is Version Control System?
• A File Management System• Records changes to a file or set of files over time• Changes recorded at a specific time is called as a
“Version” or “Snapshot”
What type of files?
• Any type of file on your computerText FilesVideoAudioImagesPDFs
Why should we care?!
• We are dealing with files every day!!
• Revert files back to a previous state• Revert the entire project back to previous state• Compare changes over time• Find who messed up!
Why should we care?!
“If you screw things up or lose files, you can easily recover”
What is git?
• One of the many version control systems
git Architecture?
git Architecture?
• Working Directory:Accessible to usersModify FilesAdd FilesDelete Files
git Architecture?
• Staging Area:Temporary storageContains files which are ready to be recorded by gitFiles are moved here before they are recorded
git Architecture?
• git Repository:Keeps snapshot of recorded filesOnes files reach here, they are safeVersions at the time of commit are stored hereContains multiple different versions of a file
What does working with git mean?
And, how do we do that?
• Commands• UI Clients
What is Source Tree?
• A UI based git desktop clientGood UIHas almost all functions of gitEasy to use
Working with git & Source Tree
gityfying a floder
New file in Working Directory
Adding file to Staging Area
Removing Staged file
Adding file to Staging Area
Modifying a Staged File
Adding file to Staging Area
Committing to git Repo
Modifying a committed file
Staging the File
Committing to git Repo
Reverting Back
git & Command Line
gityfying a floder(git init)
New file in Working Directory(git status)
Adding file to Staging Area(git add “File Name”)
Removing Staged file(git reset “File Name”)
Adding file to Staging Area(git add “File Name”)
Modifying a Staged File(git status)
Adding file to Staging Area(git add “File Name”)
Committing to git Repo(git commit –m “message”)
Modifying a committed file(git status)
Staging the File(git add “File Name”)
Committing to git Repo(git commit –m “message”)
Reverting Back(git checkout “commit” “File Name”)
Questions??
Hands-on!!