SlideShare ist ein Scribd-Unternehmen logo
1 von 24
TOPICS
• Exploring “.git” directory
• Git Terminology
• Git commands
• Cleaning branch history – Interactive rebase
• UI tools (gitk, git-gui, git-extensions)
• Merge Requests & Code Review Process
.GIT DIRECTORY
• Hooks
• Config
• Info/exclude
• Logs
• Objects
• Refs
$ tree -d .git
.git
|-- hooks
|-- config
|-- info
|-- logs
| `-- refs
| |-- heads
| `-- remotes
| `-- origin
|-- objects
| |-- info
| `-- pack
`-- refs
|-- heads
|-- remotes
| `-- origin
`-- tags
GIT GLOSSARY
• Refs – Local branches, “Remote” branches, Tags
• Upstream [Also Upstream branch]
• Working directory ⟷ Staging area (Index) ⟷ Local repo ⟷ Upstream repo
• Working Tree
• HEAD, HEAD^, HEAD~
• Change set
• Author, Committer
• Working directory: Clean Vs Dirty
• Object
• Pack
Next
GIT BRANCHES
Back
master
master
origin/master
master
Local Gitlab
master
GIT COMMANDS
• Config, Remote, Clone, Checkout
• Status, Add, Commit, Show, Amend, Revert
• Merge, Rebase
• Fetch, Pull
• Push
Next
GIT REVERT
Back
4
5
6
- 5
4
6
GIT MERGE - FF
Next
branch1 branch2
branch1
Merge “branch2” into
“branch1”
branch1
GIT MERGE – NON FF
Back
branch1
branch2branch1
Merge “branch2” into
“branch1”
branch1
GIT REBASE
Back
branch2branch1
branch1
branch1
GIT FETCH
Back
branch1 origin/branch1
origin/branch1origin/branch1
GIT PULL
Next
branch1
origin/branch1branch1
origin/branch1
GIT PULL REBASE
Back
origin/branch1branch1
branch1
origin/branch1
GIT COMMANDS
• Log
• Reset (Soft, Hard)
• Stash
• Cherry-pick
• Reflog
Next
GIT RESET
Next
branch1
branch1branch1
GIT RESET HARD
Back
branch1
GIT CHERRY-PICK
Back
branch1
branch2branch1
INTERACTIVE REBASE
$ git rebase –i HEAD~5
Cleaning branch history
GIT GUI
• Gitk
• Git-gui
• Git Extensions
• ??
Test
CODE REVIEW
• Code Review guidelines
• Merge Requests
MERGE REQUESTS
Next
developbranch
Questions?
Thank You!

Weitere ähnliche Inhalte

Ähnlich wie Gitting things done - Git Basics

git-and-bitbucket
git-and-bitbucketgit-and-bitbucket
git-and-bitbucket
azwildcat
 
Git 101 tutorial presentation
Git 101 tutorial presentationGit 101 tutorial presentation
Git 101 tutorial presentation
Terry Wang
 
Gitting It Under (Version) Control
Gitting It Under (Version) ControlGitting It Under (Version) Control
Gitting It Under (Version) Control
mobiledevnj
 

Ähnlich wie Gitting things done - Git Basics (20)

git-and-bitbucket
git-and-bitbucketgit-and-bitbucket
git-and-bitbucket
 
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 
Git Is A State Of Mind - The path to becoming a Master of the mystic art of Git
Git Is A State Of Mind - The path to becoming a Master of the mystic art of GitGit Is A State Of Mind - The path to becoming a Master of the mystic art of Git
Git Is A State Of Mind - The path to becoming a Master of the mystic art of Git
 
Gitbase, SQL interface to Git repositories
Gitbase, SQL interface to Git repositoriesGitbase, SQL interface to Git repositories
Gitbase, SQL interface to Git repositories
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Fall18 Git presentation
Fall18 Git presentationFall18 Git presentation
Fall18 Git presentation
 
11 git version control
11 git version control11 git version control
11 git version control
 
Git session Dropsolid.com
Git session Dropsolid.comGit session Dropsolid.com
Git session Dropsolid.com
 
maksym vlasov - culture of git as roots of your ci
maksym vlasov - culture of git as roots of your cimaksym vlasov - culture of git as roots of your ci
maksym vlasov - culture of git as roots of your ci
 
Source Control Using Git
Source Control Using Git Source Control Using Git
Source Control Using Git
 
Git
GitGit
Git
 
Git 基础
Git 基础Git 基础
Git 基础
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Git: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commandsGit: An introduction of plumbing and porcelain commands
Git: An introduction of plumbing and porcelain commands
 
Git 101 tutorial presentation
Git 101 tutorial presentationGit 101 tutorial presentation
Git 101 tutorial presentation
 
Six3 Getting Git
Six3 Getting GitSix3 Getting Git
Six3 Getting Git
 
Git
Git Git
Git
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Gitting It Under (Version) Control
Gitting It Under (Version) ControlGitting It Under (Version) Control
Gitting It Under (Version) Control
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 

Gitting things done - Git Basics

Hinweis der Redaktion

  1. Refs – references. All your branches, tags etc. Something that can refer to a commit HEAD – A reference to the current commit. It also is a reference to the snapshot of the entire git tree at the current stage