Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Advanced Git - git basic, git better, git good
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
devNetNoord
October 18, 2022
Programming
78
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Advanced Git - git basic, git better, git good
devNetNoord
October 18, 2022
More Decks by devNetNoord
See All by devNetNoord
Gebruik je broncode als documentatie voor je stakeholders
devnetnoord
0
54
Efficient and Secure Software Delivery with Azure Deployment Environments and Dev Box
devnetnoord
0
47
Toepassing van AI in de zorg; hype, hoop en haalbaarheid
devnetnoord
0
89
What's new with Azure Bicep?
devnetnoord
0
55
Copilot Beyond the Basics
devnetnoord
0
130
The Blazor Multiverse
devnetnoord
0
100
De Architectuur Odyssee
devnetnoord
0
61
Azure Kubernetes Service Quickstart
devnetnoord
0
68
The Office Copilot
devnetnoord
0
52
Other Decks in Programming
See All in Programming
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
610
OSINT for SRE: 学術論文とポストモーテムから探る システム障害の共通パターン / SRE NEXT 2026
tomoyk
1
3.4k
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.8k
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
150
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
350
act1-costs.pdf
sumedhbala
0
210
フィードバックで育てるAI開発
kotaminato
1
110
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
260
初めてのKubernetes 本番運用でハマった話
oku053
0
120
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
250
Vite+ Unified Toolchain for the Web
naokihaba
0
740
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
10k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
Between Models and Reality
mayunak
4
370
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
It's Worth the Effort
3n
188
29k
Abbi's Birthday
coloredviolet
3
8.6k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
370
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
650
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
220
Deep Space Network (abreviated)
tonyrice
0
220
Side Projects
sachag
455
43k
The SEO Collaboration Effect
kristinabergwall1
1
500
Transcript
Advanced Git Git basic, git better, git good Mart de
Graaf Software Engineer devNetNoord 29 september 2022
Mart de Graaf Software Engineer Nieuwsgierig en gedreven. Mart-de-graaf martdegraaf
martdegraaf
Git basic What is git? Do not learn (all) the
commands, learn the model.
Git - commits C1 C2 C3 My.Cool.WebApp ┣ My.Cool.WebApp.csproj ┣
appsettings.Development.json ┣ appsettings.json ┣ appsettings.Local.json ┣ appsettings.ServiceOverrides.json ┣ Program.cs ┗ Startup.cs My.Cool.WebApp ┣ My.Cool.WebApp.csproj ┣ appsettings.json ┣ Program.cs ┗ Startup.cs My.Cool.WebApp ┣ My.Cool.WebApp.csproj ┣ appsettings.Development.json ┣ appsettings.json ┣ Program.cs ┗ Startup.cs
Git – snapshot
Git – commit
Git - branches
None
None
.git folder
.git folder /objects
None
None
Git - Areas Git add {file} Git commit Git checkout?
A A A B B B C C
Git checkout! C C Master My-branch HEAD
File stages
Git Stash Git stash pop Git stash
None
Git Good
Git workflows • Feature branching Workflow • Release branching Workflow
• Gitflow Workflow
Git feature branching Handige naamgeving hiervoor is bijv: feature/[teamlid-naam]/[feature-naam], ofwel
feature/mart/add-readme
Git release branching
Gitflow
Git is tooling, afspraken zijn nodig Voorbeelden van teamafspraken kunnen
zijn: • Rebase, don’t merge / Merge don’t rebase • Only developer X can do Y on branch Z • Don’t push to a red build • Squash a feature to a single commit before merge to master
Git Fork
Git Fork Commit Ids Commit Authors
Git Fork Repository Stashing Area
Git better Git stash Merge vs Rebase
Git Merge
Git Rebase
Git Better, merge vs rebase Never rebase shared commits
Git Fork - rebase
Nutshell
git status git init git commit git diff git log
git branch git merge git rebase git checkout git push git pull git add git mv git fetch git stash git clone git reset git config https://www.linkedin.com/in/mart-de-graaf/
Git me a specific case We need some specific cases…
Git case: Soo many local branches git remote prune ^^
squased?? git branch --merged | grep -v "master" >/tmp/merged-branches && vi /tmp/merged-branches && xargs git branch -d </tmp/merged-branches https://stackoverflow.com/questions/7726949/remove-tracking-branches-no-longer-on-remote
Git case: Apply gitignore rules git rm --cached <file>
Azure Devops commit compare https://dev.azure.com/[env]/[project]/_git/[repo]/branchCompare ?baseVersion=GBmaster&targetVersion=GBhotfix/reservation-summary&_a=commits ?baseVersion=GC4a42a74961f6f55acd9a1d5fb34b6ccb88bc68c8&targetVersion=GBmaster&_a=commits Key Type GB
Branch GC Commit GT tagname
Git branch rename If you want to rename a branch
while pointed to any branch, do: git branch -m <oldname> <newname> If you want to rename the current branch, you can do: git branch -m <newname>
Powershell script tool voor openstaande Branches/ PR’s https://github.com/sven73a/Powershell-Utils-Azure
Let’s PRACTISE! http://onlywei.github.io/explain-git-with-d3/
• git clone
[email protected]
:foo/bar.git • cd bar • # edit
• git commit -a -m "foo" • git push • svn checkout svn://foo.com/bar bar • cd bar • # edit • svn commit -m "foo" • Git • SVN Git vs SVN
• git show HEAD^ • git show HEAD~2 • git
diff HEAD..HEAD^^ • git blame package.json • git log --graph --decorate –oneline • git show HEAD • git log --author=“Mart" • git commit –amend • git rebase –I • git reflog • git revert HEAD • Git log Git Log practise
None