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
devNetNoord
October 18, 2022
Programming
76
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
49
Efficient and Secure Software Delivery with Azure Deployment Environments and Dev Box
devnetnoord
0
45
Toepassing van AI in de zorg; hype, hoop en haalbaarheid
devnetnoord
0
78
What's new with Azure Bicep?
devnetnoord
0
51
Copilot Beyond the Basics
devnetnoord
0
120
The Blazor Multiverse
devnetnoord
0
100
De Architectuur Odyssee
devnetnoord
0
58
Azure Kubernetes Service Quickstart
devnetnoord
0
64
The Office Copilot
devnetnoord
0
46
Other Decks in Programming
See All in Programming
LLM Plugin for Node-REDの利用方法と開発について
404background
0
160
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
240
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
550
3Dシーンの圧縮
fadis
1
680
CSC307 Lecture 17
javiergs
PRO
0
320
dRuby over BLE
makicamel
2
330
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.6k
Swiftのレキシカルスコープ管理
kntkymt
0
220
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
120
Claspは野良GASの夢をみるか
takter00
0
180
スマートグラスで並列バイブコーディング
hyshu
0
100
AutonomyとControlのあいだ:Graflowで記述するAIエージェント協調
myui
0
110
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Building Applications with DynamoDB
mza
96
7.1k
Prompt Engineering for Job Search
mfonobong
0
340
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Designing for humans not robots
tammielis
254
26k
Balancing Empowerment & Direction
lara
6
1.1k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
71
40k
Side Projects
sachag
455
43k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
380
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