SlideShare a Scribd company logo
DOGHOUSE UNIVERSITY!
Git Basics
What is git?
1. Source Control Management System (SCM)!
2. Distributed!
3. Speed!
4. Data integrity

http://www-cs-students.stanford.edu/~blynn/gitmagic/ch08.html
Built by Linus…
https://www.youtube.com/watch?v=4XpnKHJAok8
Commands
1. git init!
2. git add <path>!
3. git commit!
4. git checkout <ref>
Branching
1. git branch <branch>!
2. git branch -a!
3. git branch -d!
4. git branch -D
Remotes
1. git clone <url>!
2. git remote add <remote> <url>!
3. git remote set-url <remote> <url>!
4. git push <remote> <branch>!
5. git pull <remote> <branch>
Remote tracking
1. git branch -t <branch>!
2. git checkout -t -b <branch>!
3. git fetch --all -ap
Merge vs Rebase
1. git merge <branch>!
2. git rebase <branch>
Squash
git merge —squash <branch>
# Reset the current branch to the commit just before the last 12:
git reset --hard <commit>
!
# HEAD@{1} is where the branch was just before the previous command.
# This command sets the state of the index to be as it would just
# after a merge from that commit:
git merge --squash HEAD@{1}
!
# Commit those squashed changes. The commit message will be helpfully
# prepopulated with the commit messages of all the squashed commits:
git commit
Option 2
Option 1
Don’t be evil!
1. Commit often!
2. Check your diffs BEFORE pushing

git diff, Gitk, SourceTree App!
3. Do not add/commit blindly

git add -A .

git commit -m “More styling”!
4. Create Pull Requests often!
5. Branch for everything!
6. Think of what the history will look like!
Other Stuff
1. git cherry-pick!
2. git reset!
3. git revert
Let’s Play!
1. http://pcottle.github.io/learnGitBranching/!
2. https://github.com/Gazler/githug

DOGHOUSE UNIVERSITY - Git Basics

More Related Content

PDF
Gitflow 깃플로우 공유
PPTX
Introduction to Gitlab | Gitlab 101 | Training Session
PDF
How GitHub Builds Software at Ruby Conference Kenya 2017 by Mike McQuaid
PDF
Polinomios
PPTX
Barfields slideshow 1
PPTX
Barfields slideshow. Cabinets Built by Diversified Woods Inc. divwoods.com
PPTX
Лечение и отдых в Словении
PPTX
ボランティア説明
Gitflow 깃플로우 공유
Introduction to Gitlab | Gitlab 101 | Training Session
How GitHub Builds Software at Ruby Conference Kenya 2017 by Mike McQuaid
Polinomios
Barfields slideshow 1
Barfields slideshow. Cabinets Built by Diversified Woods Inc. divwoods.com
Лечение и отдых в Словении
ボランティア説明

Viewers also liked (7)

PPTX
ADAPTIVE SEO - Definition and Methodology
PPTX
Chapter 1 b
PDF
How to get your dream job
PPTX
01 ma hoa
PPTX
Chapter 2 geography_from_tourism_perspective
PDF
Chapter 1 b
PDF
Build your own Tech Radar
ADAPTIVE SEO - Definition and Methodology
Chapter 1 b
How to get your dream job
01 ma hoa
Chapter 2 geography_from_tourism_perspective
Chapter 1 b
Build your own Tech Radar
Ad

Similar to DOGHOUSE UNIVERSITY - Git Basics (20)

PDF
Pro git - grasping it conceptually
PDF
Git and github 101
PDF
Git Tricks — git utilities that make life git easier
PPTX
Working with Git
PPTX
PPTX
Git basics : a beginner's guide
PDF
Git training v10
PPTX
Git workshop 33degree 2011 krakow
PDF
Git for beginners
PDF
Fundamentals of Git
PDF
GIT_training_SoftServeBulgaria2016
PPT
Git installation and configuration
PDF
TECH MEETUP - From the groud up with GIT
PPT
Git presentation
PDF
Git 入门 与 实践
PPTX
Getting Git...before it gets you
PPTX
Lets Git Together
PDF
Git 入门与实践
PDF
PDF
GIT Basics
Pro git - grasping it conceptually
Git and github 101
Git Tricks — git utilities that make life git easier
Working with Git
Git basics : a beginner's guide
Git training v10
Git workshop 33degree 2011 krakow
Git for beginners
Fundamentals of Git
GIT_training_SoftServeBulgaria2016
Git installation and configuration
TECH MEETUP - From the groud up with GIT
Git presentation
Git 入门 与 实践
Getting Git...before it gets you
Lets Git Together
Git 入门与实践
GIT Basics
Ad

Recently uploaded (20)

PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
Introduction to Windows Operating System
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
Types of Token_ From Utility to Security.pdf
PDF
How Tridens DevSecOps Ensures Compliance, Security, and Agility
PDF
Website Design Services for Small Businesses.pdf
PPTX
Custom Software Development Services.pptx.pptx
PDF
Complete Guide to Website Development in Malaysia for SMEs
iTop VPN Crack Latest Version Full Key 2025
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
How to Use SharePoint as an ISO-Compliant Document Management System
Salesforce Agentforce AI Implementation.pdf
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Weekly report ppt - harsh dattuprasad patel.pptx
Introduction to Windows Operating System
Designing Intelligence for the Shop Floor.pdf
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Autodesk AutoCAD Crack Free Download 2025
Wondershare Recoverit Full Crack New Version (Latest 2025)
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Types of Token_ From Utility to Security.pdf
How Tridens DevSecOps Ensures Compliance, Security, and Agility
Website Design Services for Small Businesses.pdf
Custom Software Development Services.pptx.pptx
Complete Guide to Website Development in Malaysia for SMEs

DOGHOUSE UNIVERSITY - Git Basics