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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
66
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
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
120
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
710
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
620
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
310
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
150
アクセシビリティから考える情報設計
high_g_engineer
0
370
AHC070解法紹介
eijirou
0
110
Family mrubyの進捗
kishima
1
120
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
56
38k
Security issues being discussed on Web Platforms
petamoriken
0
890
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
9
1k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
670
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
280
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
380
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
The Cost Of JavaScript in 2023
addyosmani
55
10k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
Exploring anti-patterns in Rails
aemeredith
3
510
How STYLIGHT went responsive
nonsquared
100
6.3k
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