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
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
57
Efficient and Secure Software Delivery with Azure Deployment Environments and Dev Box
devnetnoord
0
48
Toepassing van AI in de zorg; hype, hoop en haalbaarheid
devnetnoord
0
91
What's new with Azure Bicep?
devnetnoord
0
58
Copilot Beyond the Basics
devnetnoord
0
130
The Blazor Multiverse
devnetnoord
0
110
De Architectuur Odyssee
devnetnoord
0
63
Azure Kubernetes Service Quickstart
devnetnoord
0
72
The Office Copilot
devnetnoord
0
53
Other Decks in Programming
See All in Programming
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
140
Foundation Models frameworkで画像分析
ryodeveloper
1
610
Android CLI
fornewid
0
220
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
550
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
190
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
930
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
180
AIが無かった頃の素敵な出会いの話
codmoninc
1
430
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
240
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
190
Go 1.27 における memory allocation の高速化
andpad
0
180
今さら聞けない .NET CLI
htkym
0
190
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Language of Interfaces
destraynor
162
27k
The Curse of the Amulet
leimatthew05
2
14k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Practical Orchestrator
shlominoach
191
12k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
390
Making the Leap to Tech Lead
cromwellryan
135
10k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
240
Believing is Seeing
oripsolob
1
190
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
380
The World Runs on Bad Software
bkeepers
PRO
72
12k
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