Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Advanced Git - git basic, git better, git good
Search
devNetNoord
October 18, 2022
Programming
81
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
65
Efficient and Secure Software Delivery with Azure Deployment Environments and Dev Box
devnetnoord
0
53
Toepassing van AI in de zorg; hype, hoop en haalbaarheid
devnetnoord
0
100
What's new with Azure Bicep?
devnetnoord
0
61
Copilot Beyond the Basics
devnetnoord
0
140
The Blazor Multiverse
devnetnoord
0
110
De Architectuur Odyssee
devnetnoord
0
65
Azure Kubernetes Service Quickstart
devnetnoord
0
75
The Office Copilot
devnetnoord
0
60
Other Decks in Programming
See All in Programming
Webの地図
yosuke_furukawa
PRO
6
4.2k
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
230
ソフトウェアラスタライザ
fadis
1
800
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
150
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
700
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
300
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
180
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
160
iOSDC2026登壇資料.pdf
riofujimon
0
110
業務時間外もAIに働いてもらう話
colorful12
3
10k
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
140
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
Featured
See All Featured
ラッコキーワード サービス紹介資料
rakko
1
4.8M
Claude Code のすすめ
schroneko
67
230k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
450
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Writing Fast Ruby
sferik
630
63k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Practical Orchestrator
shlominoach
191
12k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
510
Producing Creativity
orderedlist
PRO
348
41k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
490
Designing Powerful Visuals for Engaging Learning
tmiket
1
540
Raft: Consensus for Rubyists
vanstee
141
7.7k
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