SlideShare a Scribd company logo
1 of 22
Git
Part 1
BY MOHAMED ABDEEN
SOFTWARE / SHAREPOINT CONSULTANT
WWW.MOHAMEDABDEEN.COM
2015
About Mohamed Abdeen
Is Software / SharePoint Consultant
6+ years of software & IT industry , Microsoft SharePoint experience,
Microsoft Certified Trainer
Contact Me @
www.mohamedabdeen.com
Mohamed.s.Abdeen@gmail.com
mabdeen84
Agenda
 Objective of the session
 Source control types
 What is the git ?
 Git is Snapshot not differences
 Who Use Git ?
 Git vs. other source control
 Git & Three States
 Before we start … Download it
 Git Repository Directory
 File Status Life Cycle
 Working with Remote Server
 Git vs. other source control
Objective
• Know new Source control called Git.
• Know git source control concept
• Know more about the git tools
• Be familiar with git basics
Source Control types
Local Version Control Systems Centralized Version Control Systems Distributed Version Control Systems
What is Git ?
 Git is a free and open source distributed version control system designed to handle
everything from small to very large projects with speed and efficiency.
 Every Git working directory is a full-fledged repository with complete history and full
version tracking capabilities, not dependent on network access or a central server.
Git is Snapshot not differences
Most other systems store information as a list
of file-based changes. These systems (CVS,
Subversion, Perforce, Bazaar, and so on) think
of the information they keep as a set of files
and the changes made to each file over time
Every time you commit, or save the state of your
project in Git, it basically takes a picture of what all
your files look like at that moment and stores a
reference to that snapshot. To be efficient, if files
have not changed, Git doesn’t store the file again—
just a link to the previous identical file it has already
stored.
Who Use Git ?
Git & Three States
 Git has three main states that your files can
reside in: committed, modified, and staged.
 Committed means that the data is safely stored
in your local database.
 Modified means that you have changed the file
but have not committed it to your database
yet.
 Staged means that you have marked a
modified file in its current version to go into your
next commit snapshot.
Modify files in your working
directory
stage the files, adding
snapshots of them to your
staging area
do a commit, which takes the
files as they are in the staging
area and stores that snapshot
permanently to your Git
directory
Before we start … Download it
Download
The download includes the following:
• Git engine
• Git command line tool
For GUI fans
There are many tools for GUI tools
You can check more Git GUI
tools on the following link …
Click Here
Git Basics
Working Directory Local Repository Remote Repository
Git Basics … Files Status
Files has to be:
1. Tracked  files that were in the last snapshot [unmodified – modified – staged ]
2. Un Tracked  any files in your working directory that were not in your last
snapshot and are not in your staging area
Get the status of files in working
directory
Start with Git
1. Takes an existing project or directory and imports it into Git.
2. Clones an existing Git repository from another server.
Initializing a Repository in an Existing
Directory
$ git init
Create new sub directory named .git that
contains all of your necessary files, at this
point, nothing in your project is tracked
yet
$ git add *.c
$ git add README
Track the file and added to the local rep
$ git commit -m 'initial project version'
Commit the files to local repository
Initializing a Repository in an Existing Directory
get a copy of an existing Git repository
$ git clone git://github.com/abdeen/grit.git
$ git clone git://github.com/abdeen/grit.git mygrit
That creates a directory named grit directory inside
it, pull down all the data for the repository and
checks out a working copy of the least version
Git Repository Directory
 The Git directory is where Git stores the
metadata and object database for your
project. This is the most important part of Git,
and it is what is copied when you clone a
repository from another computer.
 The working directory is a single checkout of
one version of the project. These files are
pulled out of the compressed database in
the Git directory and placed on disk for you
to use or modify.
 The staging area is a simple file, generally
contained in your Git directory, that stores
information about what will go into your next
commit. It’s sometimes referred to as the
index, but it’s becoming standard to refer to
it as the staging area.
Working with Remote Server
 Remote repositories are versions of your project that are hosted on
the Internet or network somewhere. You can have several of them,
each of which generally is either read-only or read/write for you.
Collaborating with others involves managing these remote
repositories and pushing and pulling data to and from them when
you need to share work.
 Git remote && git remote -v
Git vs. other source control
1. Branching & Merging
 Git allows and encourages you to have multiple local branches
that can be entirely independent of each other. The creation,
merging, and deletion of those lines of development takes
seconds.
 Create a branch to try out an idea, commit a few times, switch
back to where you branched from, apply a patch, switch back
to where you are experimenting, and merge it in.
 Create new branches for each new feature you're working on so
you can seamlessly switch back and forth between them, then
delete each branch when that feature gets merged into your
main line.
 Notably, when you push to a remote repository, you do not have
to push all of your branches. You can choose to share just one of
your branches, a few of them, or all of them
Git vs. other source control
2. Small and Fast
Git is fast. With Git, nearly all operations are
performed locally, giving it a huge speed
advantage on centralized systems that
constantly have to communicate with a server
somewhere.
Git is one or two orders of magnitude faster
than SVN, even under ideal conditions for SVN.
One place where Git is slower is in the initial
clone operation. Here, Git is downloading the
entire history rather than only the latest
version.
3. Distributed
This means that instead of doing a
"checkout" of the current tip of the source
code, you do a "clone" of the entire
repository.
This means that even if you're using a
centralized workflow, every user
essentially has a full backup of the main
server.
Git vs. other source control
4. Data Assurance
 Every file and commit is check summed and retrieved by its checksum when checked
back out. It's impossible to get anything out of Git other than the exact bits you put in.
 It is also impossible to change any file, date, commit message, or any other data in a
Git repository without changing the IDs of everything after it. This means that if you have
a commit ID, you can be assured not only that your project is exactly the same as when
it was committed, but that nothing in its history was changed.
Git vs. other source control
5. Staging Area
 This is an intermediate area where commits can be formatted and reviewed before
completing the commit.
 it's possible to quickly stage some of your files and commit them without committing
all of the other modified files in your working directory or having to list them on the
command line during the commit.
See you in the next part
Git and Remote servers
like TFS, GitHub, Bitbuck
Git Series
By Mohamed Abdeen

More Related Content

What's hot

Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHubDSCVSSUT
 
AtlasCamp 2015: Bitbucket: Building kick-ass tools for 2.5M developers
AtlasCamp 2015:  Bitbucket: Building kick-ass tools for 2.5M developersAtlasCamp 2015:  Bitbucket: Building kick-ass tools for 2.5M developers
AtlasCamp 2015: Bitbucket: Building kick-ass tools for 2.5M developersAtlassian
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Omar Fathy
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Simplilearn
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productiveKarsten Dambekalns
 
Introduction to Github for Team Project
Introduction to Github for Team ProjectIntroduction to Github for Team Project
Introduction to Github for Team ProjectAkhter Al Amin
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and GithubHouari ZEGAI
 
Gerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerGerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerLuca Milanesio
 
Git and GitHub crash course
Git and GitHub crash courseGit and GitHub crash course
Git and GitHub crash courseMireia Sangalo
 
Stable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewStable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewLuca Milanesio
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagramsDilum Navanjana
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects InfrastructureGunnar Hillert
 

What's hot (20)

Git hub visualstudiocode
Git hub visualstudiocodeGit hub visualstudiocode
Git hub visualstudiocode
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHub
 
BitBucket presentation
BitBucket presentationBitBucket presentation
BitBucket presentation
 
Git
GitGit
Git
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
AtlasCamp 2015: Bitbucket: Building kick-ass tools for 2.5M developers
AtlasCamp 2015:  Bitbucket: Building kick-ass tools for 2.5M developersAtlasCamp 2015:  Bitbucket: Building kick-ass tools for 2.5M developers
AtlasCamp 2015: Bitbucket: Building kick-ass tools for 2.5M developers
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git & GitHub N00bs
Git & GitHub N00bsGit & GitHub N00bs
Git & GitHub N00bs
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productive
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Introduction to Github for Team Project
Introduction to Github for Team ProjectIntroduction to Github for Team Project
Introduction to Github for Team Project
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Github PowerPoint Final
Github PowerPoint FinalGithub PowerPoint Final
Github PowerPoint Final
 
Gerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and DockerGerrit is Getting Native with RPM, Deb and Docker
Gerrit is Getting Native with RPM, Deb and Docker
 
Git and GitHub crash course
Git and GitHub crash courseGit and GitHub crash course
Git and GitHub crash course
 
Stable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewStable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code Review
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagrams
 
Spring Projects Infrastructure
Spring Projects InfrastructureSpring Projects Infrastructure
Spring Projects Infrastructure
 

Viewers also liked

SharePoint 2010 Managed Metadata Service Application
SharePoint 2010 Managed Metadata Service ApplicationSharePoint 2010 Managed Metadata Service Application
SharePoint 2010 Managed Metadata Service ApplicationMohamed Abdeen
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appTalbott Crowell
 
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...Nik Patel
 
SharePoint 2013 apps overview
SharePoint 2013 apps overviewSharePoint 2013 apps overview
SharePoint 2013 apps overviewElie Kash
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular jsAayush Shrestha
 
The SharePoint 2013 App Model
The SharePoint 2013 App ModelThe SharePoint 2013 App Model
The SharePoint 2013 App ModelSPC Adriatics
 

Viewers also liked (6)

SharePoint 2010 Managed Metadata Service Application
SharePoint 2010 Managed Metadata Service ApplicationSharePoint 2010 Managed Metadata Service Application
SharePoint 2010 Managed Metadata Service Application
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint app
 
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
 
SharePoint 2013 apps overview
SharePoint 2013 apps overviewSharePoint 2013 apps overview
SharePoint 2013 apps overview
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
The SharePoint 2013 App Model
The SharePoint 2013 App ModelThe SharePoint 2013 App Model
The SharePoint 2013 App Model
 

Similar to Git Series - Part 1

Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hubNaveen Pandey
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with GitSahil Agarwal
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptxEshaan35
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGandhi Ramu
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptxtnscharishma
 
SessionThree_IntroductionToVersionControlSystems
SessionThree_IntroductionToVersionControlSystemsSessionThree_IntroductionToVersionControlSystems
SessionThree_IntroductionToVersionControlSystemsHellen Gakuruh
 
Difference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs BitbucketDifference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs Bitbucketjeetendra mandal
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxAbelPhilipJoseph
 

Similar to Git Series - Part 1 (20)

Git 101
Git 101Git 101
Git 101
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Git Training
Git TrainingGit Training
Git Training
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
 
Git Mastery
Git MasteryGit Mastery
Git Mastery
 
setting up a repository using GIT
setting up a repository using GITsetting up a repository using GIT
setting up a repository using GIT
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Git_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_GuidewireGit_and_GitHub Integration_with_Guidewire
Git_and_GitHub Integration_with_Guidewire
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
SessionThree_IntroductionToVersionControlSystems
SessionThree_IntroductionToVersionControlSystemsSessionThree_IntroductionToVersionControlSystems
SessionThree_IntroductionToVersionControlSystems
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git Tutorial
Git Tutorial Git Tutorial
Git Tutorial
 
Difference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs BitbucketDifference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs Bitbucket
 
git github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptxgit github PPT_GDSCIIITK.pptx
git github PPT_GDSCIIITK.pptx
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
 
Do you git it
Do you git it Do you git it
Do you git it
 

Recently uploaded

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 

Git Series - Part 1

  • 1. Git Part 1 BY MOHAMED ABDEEN SOFTWARE / SHAREPOINT CONSULTANT WWW.MOHAMEDABDEEN.COM 2015
  • 2. About Mohamed Abdeen Is Software / SharePoint Consultant 6+ years of software & IT industry , Microsoft SharePoint experience, Microsoft Certified Trainer
  • 4. Agenda  Objective of the session  Source control types  What is the git ?  Git is Snapshot not differences  Who Use Git ?  Git vs. other source control  Git & Three States  Before we start … Download it  Git Repository Directory  File Status Life Cycle  Working with Remote Server  Git vs. other source control
  • 5. Objective • Know new Source control called Git. • Know git source control concept • Know more about the git tools • Be familiar with git basics
  • 6. Source Control types Local Version Control Systems Centralized Version Control Systems Distributed Version Control Systems
  • 7. What is Git ?  Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.  Every Git working directory is a full-fledged repository with complete history and full version tracking capabilities, not dependent on network access or a central server.
  • 8. Git is Snapshot not differences Most other systems store information as a list of file-based changes. These systems (CVS, Subversion, Perforce, Bazaar, and so on) think of the information they keep as a set of files and the changes made to each file over time Every time you commit, or save the state of your project in Git, it basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the file again— just a link to the previous identical file it has already stored.
  • 10. Git & Three States  Git has three main states that your files can reside in: committed, modified, and staged.  Committed means that the data is safely stored in your local database.  Modified means that you have changed the file but have not committed it to your database yet.  Staged means that you have marked a modified file in its current version to go into your next commit snapshot. Modify files in your working directory stage the files, adding snapshots of them to your staging area do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory
  • 11. Before we start … Download it Download The download includes the following: • Git engine • Git command line tool
  • 12. For GUI fans There are many tools for GUI tools You can check more Git GUI tools on the following link … Click Here
  • 13. Git Basics Working Directory Local Repository Remote Repository
  • 14. Git Basics … Files Status Files has to be: 1. Tracked  files that were in the last snapshot [unmodified – modified – staged ] 2. Un Tracked  any files in your working directory that were not in your last snapshot and are not in your staging area Get the status of files in working directory
  • 15. Start with Git 1. Takes an existing project or directory and imports it into Git. 2. Clones an existing Git repository from another server. Initializing a Repository in an Existing Directory $ git init Create new sub directory named .git that contains all of your necessary files, at this point, nothing in your project is tracked yet $ git add *.c $ git add README Track the file and added to the local rep $ git commit -m 'initial project version' Commit the files to local repository Initializing a Repository in an Existing Directory get a copy of an existing Git repository $ git clone git://github.com/abdeen/grit.git $ git clone git://github.com/abdeen/grit.git mygrit That creates a directory named grit directory inside it, pull down all the data for the repository and checks out a working copy of the least version
  • 16. Git Repository Directory  The Git directory is where Git stores the metadata and object database for your project. This is the most important part of Git, and it is what is copied when you clone a repository from another computer.  The working directory is a single checkout of one version of the project. These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify.  The staging area is a simple file, generally contained in your Git directory, that stores information about what will go into your next commit. It’s sometimes referred to as the index, but it’s becoming standard to refer to it as the staging area.
  • 17. Working with Remote Server  Remote repositories are versions of your project that are hosted on the Internet or network somewhere. You can have several of them, each of which generally is either read-only or read/write for you. Collaborating with others involves managing these remote repositories and pushing and pulling data to and from them when you need to share work.  Git remote && git remote -v
  • 18. Git vs. other source control 1. Branching & Merging  Git allows and encourages you to have multiple local branches that can be entirely independent of each other. The creation, merging, and deletion of those lines of development takes seconds.  Create a branch to try out an idea, commit a few times, switch back to where you branched from, apply a patch, switch back to where you are experimenting, and merge it in.  Create new branches for each new feature you're working on so you can seamlessly switch back and forth between them, then delete each branch when that feature gets merged into your main line.  Notably, when you push to a remote repository, you do not have to push all of your branches. You can choose to share just one of your branches, a few of them, or all of them
  • 19. Git vs. other source control 2. Small and Fast Git is fast. With Git, nearly all operations are performed locally, giving it a huge speed advantage on centralized systems that constantly have to communicate with a server somewhere. Git is one or two orders of magnitude faster than SVN, even under ideal conditions for SVN. One place where Git is slower is in the initial clone operation. Here, Git is downloading the entire history rather than only the latest version. 3. Distributed This means that instead of doing a "checkout" of the current tip of the source code, you do a "clone" of the entire repository. This means that even if you're using a centralized workflow, every user essentially has a full backup of the main server.
  • 20. Git vs. other source control 4. Data Assurance  Every file and commit is check summed and retrieved by its checksum when checked back out. It's impossible to get anything out of Git other than the exact bits you put in.  It is also impossible to change any file, date, commit message, or any other data in a Git repository without changing the IDs of everything after it. This means that if you have a commit ID, you can be assured not only that your project is exactly the same as when it was committed, but that nothing in its history was changed.
  • 21. Git vs. other source control 5. Staging Area  This is an intermediate area where commits can be formatted and reviewed before completing the commit.  it's possible to quickly stage some of your files and commit them without committing all of the other modified files in your working directory or having to list them on the command line during the commit.
  • 22. See you in the next part Git and Remote servers like TFS, GitHub, Bitbuck Git Series By Mohamed Abdeen