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
De Basics Van Git - Koen Verburggen
Search
WPMeetup Antwerp
January 26, 2016
68
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
De Basics Van Git - Koen Verburggen
WPMeetup Antwerp
January 26, 2016
More Decks by WPMeetup Antwerp
See All by WPMeetup Antwerp
Dieter Vertessen: AdWords
wpmeetupantwerp
0
500
Responsive Images, srcset/sizes and WordPress by Jan Henckens
wpmeetupantwerp
0
320
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.5k
Deep Space Network (abreviated)
tonyrice
0
310
Ruling the World: When Life Gets Gamed
codingconduct
0
340
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Typedesign – Prime Four
hannesfritz
42
3.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
340
Code Review Best Practice
trishagee
74
20k
Design in an AI World
tapps
1
320
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
ラッコキーワード サービス紹介資料
rakko
1
4.9M
The Spectacular Lies of Maps
axbom
PRO
1
1k
Transcript
Git basis Koen Verbruggen WP Antwerp 18 jan 2016
[email protected]
https://ict.mind-heart-soul.org Git basis – TOC 1.Introductie 2.De 3 meest gebruikte commando's 3.Vanaf het begin 4.Branching / merging 5.Veranderingen bekijken
[email protected]
https://ict.mind-heart-soul.org
Introductie – versie beheer ↔ Git manueel
[email protected]
https://ict.mind-heart-soul.org 3
meest gebruikte commando's 1.git add . 2.git commit -am "documentatie" 3.git push origin master 1bis : git add --all > bij gewiste / verplaatste bestanden
[email protected]
https://ict.mind-heart-soul.org Vanaf het begin – config (1x) • git config --global user.name “vn an” • git config --global user.email “email” • git config --list
[email protected]
https://ict.mind-heart-soul.org Vanaf het begin – commando's 1.Server (ssh) git init --bare test.git 2.Lokaal (git bash) git clone ssh://user@host:/home/user/test.git geen server : i. mkdir test ii.cd test iii. git init
[email protected]
https://ict.mind-heart-soul.org
3 meest gebruikte commando's 1.git add . OF git add
--all 2.git commit -am "documentatie" 3.git push origin master herhaal ad infinitum
[email protected]
https://ict.mind-heart-soul.org Vanaf het begin – remote • Automatisch (host1 = “origin” remote) : git clone ssh://user1@host1:/home/user1/test.git > git push origin master • Manueel (host2 = “remote-name” remote) : 1.cd repo-name 2. git remote add remote-name ssh://user2@host2:/path/repo-name.git > git push remote-name master
[email protected]
https://ict.mind-heart-soul.org Git branching / merging • Kracht + complexiteit van git • Branching strategie nodig > Vele werkwijzes • Merging strategie nodig > Vele werkwijzes > Verschillende commando sequenties
[email protected]
https://ict.mind-heart-soul.org Git branching • Overzicht : git branch • Wisselen : git checkout branch-name • Nieuwe : git checkout -b branch-name – Maakt nieuwe branch – Gaat naar nieuwe branch • Delete : git branch -d branch-name > branch must be fully merged (-D)
[email protected]
https://ict.mind-heart-soul.org Git merging #make a branch the master 1.git checkout new-master 2.git merge -s ours master 3.git checkout master 4.git merge new-master 5.git commit -am "documentation"
[email protected]
https://ict.mind-heart-soul.org Veranderingen – geschiedenis # bekijk commits (exit “q”) • git log • git log -n 5 • git log --after=YYYY-MM-DD • git log file-name.ext • git log --name-status
[email protected]
https://ict.mind-heart-soul.org
Veranderingen – vergelijken # vergelijk bestanden (exit “q”) # SHA
hash : 40 hexadecimaal (6 eerste) • git diff • git diff SHA1 SHA2 • git diff file-name.ext • git diff --name-status
[email protected]
https://ict.mind-heart-soul.org Veranderingen – teruggaan # laatste commit ongedaan maken # werkt door nieuwe commit te maken → # vorige → → juist fout juist → volgende 1.git revert HEAD 2.git push origin master
[email protected]
https://ict.mind-heart-soul.org Veranderingen – undelete # herstel per ongeluk gewiste bestanden # toon overzicht van (D) bestanden 1.git checkout # specifiek bestand terughalen 2.git checkout file-name.ext
[email protected]
https://ict.mind-heart-soul.org Vragen ?
[email protected]
https://ict.mind-heart-soul.org