Presentation is loading. Please wait.

Presentation is loading. Please wait.

Version Control System using Git

Similar presentations


Presentation on theme: "Version Control System using Git"— Presentation transcript:

1 Version Control System using Git

2 Presented by: Rohit Das Rudra Nil Basu 3000114022 30000114023
Rudra Nil Basu

3 1. The Problem Why do we need Version Control System anyway?

4 Maintaining group Projects
Patches are mostly sent via Difficult to roll back Almost impossible to maintain if the number of people working in the project is large Testing new unstable features

5 2. Version Control System

6 Version Control: What is it?
A method for recalling versions of a codebase Keeping a record of changes Who did what and when in the system Save yourself when things inevitably go wrong

7 Version Control: Why? Individual Back-ups of the project
Create a “checkpoint” in the project at any stage: Fearlessly modify code Tagging: Mark certain point in time Branching: Release versions and continue development

8 Version Control: Why? Team Everything in “Individual”
Allow multiple developer to work on the same codebase Merge changes across same files: handle conflicts Check who made which change: blame/praise

9 Version Control: Types
Centralised VCS Distributed VCS

10 Centralised VCS A single authoritative data source (repository)
Check-outs and check-ins are done with reference to this central repository Centralised VCS

11 Centralised VCS

12 Centralised VCS Examples: Concurrent Version System (CVS)
Subversion (SVN) Centralised VCS

13 Distributed VCS No single repository is authoritative
Data can be checked in and out from any repository Distributed VCS

14 Distributed VCS

15 Examples Git Mercurial Distributed VCS

16 3. Git --everything-is-local

17 Free, open source Fully distributed Handle small files very effectively Tracks contents, not files Data = Snapshot No network Three stages

18 Created by Linus Torvalds in less than 2 weeks
Currently maintained by Junio C Hamano

19 Git: Stages Three stages: Working directory Staging directory
Git directory (repository) Git: Stages

20 Setup git init git clone <remote-url> Git: Development

21 Git: Development Check “snapshots” of the codebase git log
Show commit logs Git: Development

22 Commit logs Git: Development

23 Branches git checkout –b <branch-name> Git: Development

24 View changes git diff Git: Development

25 View changes Git: Development

26 Git: Development Update staging area git add <files>
Add file contents to the index Git: Development

27 Git: Development Create “snapshots” of your codebase git commit
Records changes to the repository Git: Development

28 Merge other branches git merge Git: Development

29 Git: Development

30 Git: Development Make patches git format-patch --stdout > fix.patch
Patch created as “fix.patch” Prepare patches for submission Send patch via mail Git: Development

31 Make patches Git: Development

32 Git: Development Applying patches git apply < fix.patch
Applies changes from the patch Git: Development

33 Result? Much efficient workflow
Creating and merging branches are very easy and fast Result?

34 The development process of the Linux kernel is maintained using Git
The Linux kernel development process has: Over 2000 individual contributors per year Grows by nearly 300,000 lines per year Result?

35 THANK YOU! Rohit Das Rudra Nil Basu rudra.nil.basu.1996@gmail.com
mouri11.github.io Rudra Nil Basu rudranilbasu.me


Download ppt "Version Control System using Git"

Similar presentations


Ads by Google