SlideShare a Scribd company logo
@LorenzoBaracchi
A System that records changes to files over time,
so that you can recall specific versions later.
Version Control System
Alice
Version Control System
Local Centralized Distributed
vers.3
vers.2
vers.1
File
vers.3
vers.2
vers.1
File File
Alice Bob
File
v.3
v.2
v.1
Bob
File
v.3
v.2
v.1
vers.3
vers.2
vers.1
Git Basic
Working
Directory
Staging
Area
Repository
Git Basic
Working
Directory
Staging
Area
Repository
My File
Git Basic
Working
Directory
Staging
Area
Repository
My File
git add
changes 

to My File
Git Basic
Working
Directory
Staging
Area
Repository
My File
git add git commit
changes 

to My File
Local
Git Basic
Working
Directory
Staging
Area
Repository
My File
git add git commit
changes 

to My File
Git Basic
Local
Working
Directory
Staging
Area
Repository
My File
git add git commit
changes 

to My File
Git Basic
Local
Working
Directory
Staging
Area
Repository
My File
git add git commit
changes 

to My File
Remote
Git Basic
Local
Working
Directory
Staging
Area
Repository
My File
git add git commit
changes 

to My File
Remote
git push
3 States
Working
Directory
Staging
Area
Repository
Modified Staged Committed
git
101
Recording Changes
History of Changes
Undo
Going Remote
git status
Recording Changes
show in which state a file is:
modified, staged, committed
Working
Directory
Staging
Area
Repository
git status
Recording Changes
show in which state a file is:
modified, staged, committed
Working
Directory
Staging
Area
Repository
≠ ≠
git diff
Recording Changes
shows changed made but not yet staged
--staged shows changes staged but not yet committed
Working
Directory
Staging
Area
Repository
git diff
Recording Changes
shows changed made but not yet staged
--staged shows changes staged but not yet committed
Working
Directory
Staging
Area
Repository
diff diff --staged
git add <file, dir>
Recording Changes
“prepare this content for the next commit”
saves only current modifications, not futures modifications
Working
Directory
Staging
Area
Repository
git add <file, dir>
Recording Changes
“prepare this content for the next commit”
saves only current modifications, not futures modifications
Working
Directory
Staging
Area
Repository
puts “Hello
World
Everybody”
git add <file, dir>
Recording Changes
“prepare this content for the next commit”
saves only current modifications, not futures modifications
Working
Directory
Staging
Area
Repository
puts “Hello
World
Everybody”
- Words
+ Everybody
git add <file, dir>
Recording Changes
“prepare this content for the next commit”
saves only current modifications, not futures modifications
Working
Directory
Staging
Area
Repository
puts “Hello
World
Everybody”
- Words
+ Everybody
git rm <file, dir>
Recording Changes
Removes the specified file(s) from staging area and current
--cached do not remove the file from the working directory
Working
Directory
Staging
Area
Repository
foo.rb
bar.rb
foobar.rb
foo.rb
bar.rb
foobar.rb
git rm <file, dir>
Recording Changes
Removes the specified file(s) from staging area and current
--cached do not remove the file from the working directory
Working
Directory
Staging
Area
Repository
foo.rb
bar.rb
foobar.rb
foo.rb
bar.rb
foobar.rb
git commit
Recording Changes
Saves the changes made in the staging area to the repository
Working
Directory
Staging
Area
Repository
puts “Hello
World
Everybody”
- Words
+ Everybody
git commit
Recording Changes
Saves the changes made in the staging area to the repository
Working
Directory
Staging
Area
Repository
puts “Hello
World
Everybody”
- Words
+ Everybody
git log
History of Changes
Lists informations about commits in reverse chronological order
commit ca82a6dff817ec66f44342007202690a93763949
Author: Scott Chacon <schacon@gee-mail.com>
Date: Mon Mar 17 21:52:11 2008 -0700
changed the version number
commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
Author: Scott Chacon <schacon@gee-mail.com>
Date: Sat Mar 15 16:40:33 2008 -0700
removed unnecessary test
commit a11bef06a3f659402fe7563abf99ad00de2209e6
Author: Scott Chacon <schacon@gee-mail.com>
Date: Sat Mar 15 10:31:28 2008 -0700
first commit
git log
History of Changes
Lists informations about commits in reverse chronological order
commit ca82a6dff817ec66f44342007202690a93763949
Author: Scott Chacon <schacon@gee-mail.com>
Date: Mon Mar 17 21:52:11 2008 -0700
changed the version number
commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
Author: Scott Chacon <schacon@gee-mail.com>
Date: Sat Mar 15 16:40:33 2008 -0700
removed unnecessary test
commit a11bef06a3f659402fe7563abf99ad00de2209e6
Author: Scott Chacon <schacon@gee-mail.com>
Date: Sat Mar 15 10:31:28 2008 -0700
first commit
git log -p
History of Changes
Shows differences introduced by every commit
commit ca82a6dff817ec66f44342007202690a93763949
Author: Scott Chacon <schacon@gee-mail.com>
Date: Mon Mar 17 21:52:11 2008 -0700
changed the version number
diff --git a/Rakefile b/Rakefile
index a874b73..8f94139 100644
--- a/Rakefile
+++ b/Rakefile
@@ -5,7 +5,7 @@ require 'rake/gempackagetask'
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = "simplegit"
- s.version = "0.1.0"
+ s.version = "0.1.1"
s.author = "Scott Chacon"
s.email = "schacon@gee-mail.com"
s.summary = "A simple gem for using Git in Ruby code."
git log -p
History of Changes
Shows differences introduced by every commit
commit ca82a6dff817ec66f44342007202690a93763949
Author: Scott Chacon <schacon@gee-mail.com>
Date: Mon Mar 17 21:52:11 2008 -0700
changed the version number
diff --git a/Rakefile b/Rakefile
index a874b73..8f94139 100644
--- a/Rakefile
+++ b/Rakefile
@@ -5,7 +5,7 @@ require 'rake/gempackagetask'
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = "simplegit"
- s.version = "0.1.0"
+ s.version = "0.1.1"
s.author = "Scott Chacon"
s.email = "schacon@gee-mail.com"
s.summary = "A simple gem for using Git in Ruby code."
Where
What
git log OPTIONS
History of Changes
--stat shows list of modified files
-1
-2
-n
shows last commit
shows last 2 commits
shows last n commits
-S<string>
only shows commits
adding/removing <string>
git commit --amend
Undo
takes changes in staging area and adds them to the previous commit
Working
Directory
Staging
Area
Repository
list of
changes
git commit --amend
Undo
takes changes in staging area and adds them to the previous commit
Working
Directory
Staging
Area
Repository
list of
changes
git reset HEAD <file>
Undo
Removes the selected file from the staging area
Working
Directory
Staging
Area
Repository
puts “Hello
World
Everybody”
- Words
+ Everybody
git reset HEAD <file>
Undo
Removes the selected file from the staging area
Working
Directory
Staging
Area
Repository
puts “Hello
World
Everybody”
git checkout -- <file>
Undo
Discards changes of the file in the working directory
Working
Directory
Staging
Area
Repository
puts “Hello
World
Everybody”
git checkout -- <file>
Undo
Discards changes of the file in the working directory
Working
Directory
Staging
Area
Repository
puts “Hello
World
Everybody”
puts “Hello
World”
git push <remote_name> <branch_name>
Going Remote
Shares the modifications with the remote repository
Local
Working
Directory
Staging
Area
Repository
My File
changes 

to My File
Remote
master
branch
git push <remote_name> <branch_name>
Going Remote
Shares the modifications with the remote repository
Local
Working
Directory
Staging
Area
Repository
My File
changes 

to My File
Remote
git push
master
branch
git fetch <remote_name>
Going Remote
Retrieves data from the remote repository (do not merge)
Local
Working
Directory
Staging
Area
Repository
My File changes 

to My File
Remote
1
master
2
3
5
4
1
2
3
3
git fetch <remote_name>
Going Remote
Retrieves data from the remote repository (do not merge)
Local
Working
Directory
Staging
Area
Repository
My File changes 

to My File
Remote
1
master
2
3
5
4
1
2
3
3
5
4
git pull
Going Remote
Retrieves data from the remote repository (and merge)
Local
Working
Directory
Staging
Area
Repository
My File changes 

to My File
Remote
1
master
2
3
5
4
1
2
3
3
git pull
Going Remote
Retrieves data from the remote repository (and merge)
Local
Working
Directory
Staging
Area
Repository
My File changes 

to My File
Remote
1
master
2
3
5
4
1
2
3
4
5
3
Branching
branch: you diverge from the main line of development
and continue to do work without messing with that main line
master
master
mybranch
$ git branch mybranch
master
mybranch
$ git branch mybranch
$ git checkout mybranch
master
mybranch
$ git branch mybranch
$ git checkout mybranch
$ git commit
master
mybranch
$ git branch mybranch
$ git checkout mybranch
$ git commit
$ git commit
master
mybranch
$ git branch mybranch
$ git checkout mybranch
$ git commit
$ git commit
$ git checkout master
Merging
master
mybranch
master
mybranch
$ git checkout master
mybranch
master
$ git checkout master
$ git merge mybranch
master
mybranch
mybranch
master
$ git commit
mybranch
$ git commit
master
$ git merge mybranch
wants you to branch&merge

More Related Content

What's hot

Git Cards - Powerpoint Format
Git Cards - Powerpoint FormatGit Cards - Powerpoint Format
Git Cards - Powerpoint Format
Adam Lowe
 
Git real slides
Git real slidesGit real slides
Git real slides
Lucas Couto
 
Use Git like a pro - condensed
Use Git like a pro - condensedUse Git like a pro - condensed
Use Git like a pro - condensed
Jesús Miguel Benito Calzada
 
Git - Get Ready To Use It
Git - Get Ready To Use ItGit - Get Ready To Use It
Git - Get Ready To Use It
Daniel Kummer
 
Git for beginner
Git for beginnerGit for beginner
Git for beginner
Trung Huynh
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
Prakash Dantuluri
 
VersionEEring
VersionEEringVersionEEring
VersionEEring
Ruthie BenDor
 
Git Real
Git RealGit Real
Git Real
Gong Haibing
 
Git
GitGit
Basic Git
Basic GitBasic Git
Basic Git
Knut Haugen
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
Nguyen Van Hung
 
Git for the absolute beginners
Git for the absolute beginnersGit for the absolute beginners
Git for the absolute beginners
Gabriele Baldassarre
 
Git-ing out of your git messes - Fluent Conf 2017
Git-ing out of  your git messes - Fluent Conf 2017Git-ing out of  your git messes - Fluent Conf 2017
Git-ing out of your git messes - Fluent Conf 2017
Katie Sylor-Miller
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messes
Katie Sylor-Miller
 
DrupalCafe5 VCS
DrupalCafe5 VCSDrupalCafe5 VCS
DrupalCafe5 VCS
Yuriy Gerasimov
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
DivineOmega
 
Introduction to Git Version Control System
Introduction to Git Version Control SystemIntroduction to Git Version Control System
Introduction to Git Version Control System
Oleksandr Zaitsev
 
Git for-fun-and-productivity
Git for-fun-and-productivityGit for-fun-and-productivity
Git for-fun-and-productivity
Karthik Sirasanagandla
 
Git Basics at Rails Underground
Git Basics at Rails UndergroundGit Basics at Rails Underground
Git Basics at Rails Underground
Ariejan de Vroom
 
Git tutorial undoing changes
Git tutorial   undoing changesGit tutorial   undoing changes
Git tutorial undoing changes
LearningTech
 

What's hot (20)

Git Cards - Powerpoint Format
Git Cards - Powerpoint FormatGit Cards - Powerpoint Format
Git Cards - Powerpoint Format
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Use Git like a pro - condensed
Use Git like a pro - condensedUse Git like a pro - condensed
Use Git like a pro - condensed
 
Git - Get Ready To Use It
Git - Get Ready To Use ItGit - Get Ready To Use It
Git - Get Ready To Use It
 
Git for beginner
Git for beginnerGit for beginner
Git for beginner
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
 
VersionEEring
VersionEEringVersionEEring
VersionEEring
 
Git Real
Git RealGit Real
Git Real
 
Git
GitGit
Git
 
Basic Git
Basic GitBasic Git
Basic Git
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
 
Git for the absolute beginners
Git for the absolute beginnersGit for the absolute beginners
Git for the absolute beginners
 
Git-ing out of your git messes - Fluent Conf 2017
Git-ing out of  your git messes - Fluent Conf 2017Git-ing out of  your git messes - Fluent Conf 2017
Git-ing out of your git messes - Fluent Conf 2017
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messes
 
DrupalCafe5 VCS
DrupalCafe5 VCSDrupalCafe5 VCS
DrupalCafe5 VCS
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
 
Introduction to Git Version Control System
Introduction to Git Version Control SystemIntroduction to Git Version Control System
Introduction to Git Version Control System
 
Git for-fun-and-productivity
Git for-fun-and-productivityGit for-fun-and-productivity
Git for-fun-and-productivity
 
Git Basics at Rails Underground
Git Basics at Rails UndergroundGit Basics at Rails Underground
Git Basics at Rails Underground
 
Git tutorial undoing changes
Git tutorial   undoing changesGit tutorial   undoing changes
Git tutorial undoing changes
 

Similar to Git presentation

Git undo
Git undoGit undo
Git undo
Avilay Parekh
 
sample.pptx
sample.pptxsample.pptx
sample.pptx
UshaSuray
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Aleksey Asiutin
 
Atlassian git cheatsheet
Atlassian git cheatsheetAtlassian git cheatsheet
Atlassian git cheatsheet
Abdul Basit
 
Git basic commands
Git basic commandsGit basic commands
Git basic commands
Adarsh Konchady
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
King Hom
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__white
King Hom
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
King Hom
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
 
GIT_In_90_Minutes
GIT_In_90_MinutesGIT_In_90_Minutes
GIT_In_90_Minutes
vimukthirandika
 
Git workshop
Git workshopGit workshop
Git workshop
Mateusz Galazyn
 
git.ppt.pdf
git.ppt.pdfgit.ppt.pdf
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
Marco De Stefano
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
Rasan Samarasinghe
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
atishgoswami
 
Version controll.pptx
Version controll.pptxVersion controll.pptx
Version controll.pptx
Md. Main Uddin Rony
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Jae Nwawe
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
leo_priv00
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
vartmp
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Augusto Gabriel Luna Bardales
 

Similar to Git presentation (20)

Git undo
Git undoGit undo
Git undo
 
sample.pptx
sample.pptxsample.pptx
sample.pptx
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Atlassian git cheatsheet
Atlassian git cheatsheetAtlassian git cheatsheet
Atlassian git cheatsheet
 
Git basic commands
Git basic commandsGit basic commands
Git basic commands
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__white
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
GIT_In_90_Minutes
GIT_In_90_MinutesGIT_In_90_Minutes
GIT_In_90_Minutes
 
Git workshop
Git workshopGit workshop
Git workshop
 
git.ppt.pdf
git.ppt.pdfgit.ppt.pdf
git.ppt.pdf
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Version controll.pptx
Version controll.pptxVersion controll.pptx
Version controll.pptx
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
 

Recently uploaded

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Zilliz
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...Building RAG with self-deployed Milvus vector database and Snowpark Container...
Building RAG with self-deployed Milvus vector database and Snowpark Container...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Git presentation

  • 2. A System that records changes to files over time, so that you can recall specific versions later. Version Control System
  • 3. Alice Version Control System Local Centralized Distributed vers.3 vers.2 vers.1 File vers.3 vers.2 vers.1 File File Alice Bob File v.3 v.2 v.1 Bob File v.3 v.2 v.1 vers.3 vers.2 vers.1
  • 11. Git Basic Local Working Directory Staging Area Repository My File git add git commit changes to My File Remote git push
  • 14. Recording Changes History of Changes Undo Going Remote
  • 15. git status Recording Changes show in which state a file is: modified, staged, committed Working Directory Staging Area Repository
  • 16. git status Recording Changes show in which state a file is: modified, staged, committed Working Directory Staging Area Repository ≠ ≠
  • 17. git diff Recording Changes shows changed made but not yet staged --staged shows changes staged but not yet committed Working Directory Staging Area Repository
  • 18. git diff Recording Changes shows changed made but not yet staged --staged shows changes staged but not yet committed Working Directory Staging Area Repository diff diff --staged
  • 19. git add <file, dir> Recording Changes “prepare this content for the next commit” saves only current modifications, not futures modifications Working Directory Staging Area Repository
  • 20. git add <file, dir> Recording Changes “prepare this content for the next commit” saves only current modifications, not futures modifications Working Directory Staging Area Repository puts “Hello World Everybody”
  • 21. git add <file, dir> Recording Changes “prepare this content for the next commit” saves only current modifications, not futures modifications Working Directory Staging Area Repository puts “Hello World Everybody” - Words + Everybody
  • 22. git add <file, dir> Recording Changes “prepare this content for the next commit” saves only current modifications, not futures modifications Working Directory Staging Area Repository puts “Hello World Everybody” - Words + Everybody
  • 23. git rm <file, dir> Recording Changes Removes the specified file(s) from staging area and current --cached do not remove the file from the working directory Working Directory Staging Area Repository foo.rb bar.rb foobar.rb foo.rb bar.rb foobar.rb
  • 24. git rm <file, dir> Recording Changes Removes the specified file(s) from staging area and current --cached do not remove the file from the working directory Working Directory Staging Area Repository foo.rb bar.rb foobar.rb foo.rb bar.rb foobar.rb
  • 25. git commit Recording Changes Saves the changes made in the staging area to the repository Working Directory Staging Area Repository puts “Hello World Everybody” - Words + Everybody
  • 26. git commit Recording Changes Saves the changes made in the staging area to the repository Working Directory Staging Area Repository puts “Hello World Everybody” - Words + Everybody
  • 27. git log History of Changes Lists informations about commits in reverse chronological order commit ca82a6dff817ec66f44342007202690a93763949 Author: Scott Chacon <schacon@gee-mail.com> Date: Mon Mar 17 21:52:11 2008 -0700 changed the version number commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7 Author: Scott Chacon <schacon@gee-mail.com> Date: Sat Mar 15 16:40:33 2008 -0700 removed unnecessary test commit a11bef06a3f659402fe7563abf99ad00de2209e6 Author: Scott Chacon <schacon@gee-mail.com> Date: Sat Mar 15 10:31:28 2008 -0700 first commit
  • 28. git log History of Changes Lists informations about commits in reverse chronological order commit ca82a6dff817ec66f44342007202690a93763949 Author: Scott Chacon <schacon@gee-mail.com> Date: Mon Mar 17 21:52:11 2008 -0700 changed the version number commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7 Author: Scott Chacon <schacon@gee-mail.com> Date: Sat Mar 15 16:40:33 2008 -0700 removed unnecessary test commit a11bef06a3f659402fe7563abf99ad00de2209e6 Author: Scott Chacon <schacon@gee-mail.com> Date: Sat Mar 15 10:31:28 2008 -0700 first commit
  • 29. git log -p History of Changes Shows differences introduced by every commit commit ca82a6dff817ec66f44342007202690a93763949 Author: Scott Chacon <schacon@gee-mail.com> Date: Mon Mar 17 21:52:11 2008 -0700 changed the version number diff --git a/Rakefile b/Rakefile index a874b73..8f94139 100644 --- a/Rakefile +++ b/Rakefile @@ -5,7 +5,7 @@ require 'rake/gempackagetask' spec = Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = "simplegit" - s.version = "0.1.0" + s.version = "0.1.1" s.author = "Scott Chacon" s.email = "schacon@gee-mail.com" s.summary = "A simple gem for using Git in Ruby code."
  • 30. git log -p History of Changes Shows differences introduced by every commit commit ca82a6dff817ec66f44342007202690a93763949 Author: Scott Chacon <schacon@gee-mail.com> Date: Mon Mar 17 21:52:11 2008 -0700 changed the version number diff --git a/Rakefile b/Rakefile index a874b73..8f94139 100644 --- a/Rakefile +++ b/Rakefile @@ -5,7 +5,7 @@ require 'rake/gempackagetask' spec = Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = "simplegit" - s.version = "0.1.0" + s.version = "0.1.1" s.author = "Scott Chacon" s.email = "schacon@gee-mail.com" s.summary = "A simple gem for using Git in Ruby code." Where What
  • 31. git log OPTIONS History of Changes --stat shows list of modified files -1 -2 -n shows last commit shows last 2 commits shows last n commits -S<string> only shows commits adding/removing <string>
  • 32. git commit --amend Undo takes changes in staging area and adds them to the previous commit Working Directory Staging Area Repository list of changes
  • 33. git commit --amend Undo takes changes in staging area and adds them to the previous commit Working Directory Staging Area Repository list of changes
  • 34. git reset HEAD <file> Undo Removes the selected file from the staging area Working Directory Staging Area Repository puts “Hello World Everybody” - Words + Everybody
  • 35. git reset HEAD <file> Undo Removes the selected file from the staging area Working Directory Staging Area Repository puts “Hello World Everybody”
  • 36. git checkout -- <file> Undo Discards changes of the file in the working directory Working Directory Staging Area Repository puts “Hello World Everybody”
  • 37. git checkout -- <file> Undo Discards changes of the file in the working directory Working Directory Staging Area Repository puts “Hello World Everybody” puts “Hello World”
  • 38. git push <remote_name> <branch_name> Going Remote Shares the modifications with the remote repository Local Working Directory Staging Area Repository My File changes to My File Remote master branch
  • 39. git push <remote_name> <branch_name> Going Remote Shares the modifications with the remote repository Local Working Directory Staging Area Repository My File changes to My File Remote git push master branch
  • 40. git fetch <remote_name> Going Remote Retrieves data from the remote repository (do not merge) Local Working Directory Staging Area Repository My File changes to My File Remote 1 master 2 3 5 4 1 2 3 3
  • 41. git fetch <remote_name> Going Remote Retrieves data from the remote repository (do not merge) Local Working Directory Staging Area Repository My File changes to My File Remote 1 master 2 3 5 4 1 2 3 3 5 4
  • 42. git pull Going Remote Retrieves data from the remote repository (and merge) Local Working Directory Staging Area Repository My File changes to My File Remote 1 master 2 3 5 4 1 2 3 3
  • 43. git pull Going Remote Retrieves data from the remote repository (and merge) Local Working Directory Staging Area Repository My File changes to My File Remote 1 master 2 3 5 4 1 2 3 4 5 3
  • 45. branch: you diverge from the main line of development and continue to do work without messing with that main line
  • 48. master mybranch $ git branch mybranch $ git checkout mybranch
  • 49. master mybranch $ git branch mybranch $ git checkout mybranch $ git commit
  • 50. master mybranch $ git branch mybranch $ git checkout mybranch $ git commit $ git commit
  • 51. master mybranch $ git branch mybranch $ git checkout mybranch $ git commit $ git commit $ git checkout master
  • 55. mybranch master $ git checkout master $ git merge mybranch
  • 58. mybranch $ git commit master $ git merge mybranch
  • 59. wants you to branch&merge