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
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Automating Front-end Workflow
addyosmani
1369
210k
Deep Space Network (abreviated)
tonyrice
0
370
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Abbi's Birthday
coloredviolet
4
10k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
600
A Soul's Torment
seathinner
8
3.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Marketing to machines
jonoalderson
1
5.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
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