SlideShare a Scribd company logo
Devaamo ry

sli
d

es

up

da
te
d1

Otto Kekäläinen
Uusi Tehdas / New Factory
Tampere 29.11.2012

.1 2
.

Git training with Devaamo
Outline
1. The story of Git
2. Basic commands
3. Git internals
4. Doing it with Github
5. Advanced commands
6. Git everywhere
1. Story of Git
Git /ɡɪt/

”A silly, incompetent, stupid,
annoying or childish person.”
http://en.wiktionary.org/wiki/git
"I'm an egotistical bastard, so I
name all my projects after myself.
First Linux, now Git”
Linus Torvalds, PC World. 2012-07-14
Linus needed a new source code revision manager for
Linux, and none of the available open source options at
the time where good enough, so he wrote his own in
April 2005.
Kernel 2.6.12 was the first release managed by Git and
version 1.0 of Git was released in December 2005.
Design goals of Git:
●
distributed revision management
●
protection against corruption,
both accidental and hostile
●
speed
Popularity doubled from 2011 to 2012!
...but adoption would be faster if it was
not so difficult to use.
Originally Linus did not intend end users to use Git
directly, instead he tried to delegate to somebody
else the task of making the actual command line
interface. We are still waiting for it...
Luckily Git has been simplified and documentation
has improved over time, but some Git commands
still refer to Git internals that are difficult to grasp.
E.g. git-push: Update remote refs along with
associated objects.
2. Basic commands
First obstacle: same terms with different meanings
git init
git add example.txt
git commit -nam “First commit”
# fill example.txt with text from http://git-scm.com/
git commit -nam “Second commit”
git log
git diff HEAD^
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git clone git://github.com/Seravo/events-manager-translations.git
# edit files
git commit -nam “Updated translation”
git push
git pull
# edit files
git commit -nam “Implemented X”
git push
git blame readme.txt
3. Git internals
Folder /.git contains everything,
your / is just the working copy.
Folder /.git contains everything,
your / is just the working copy.
When you commit a 2 MB file /example.png,
your / will grow to 4 MB...
When you add a file,
it goes to the staging area.
The file does not go into the
actual history tree until the stage
is committed.
Push and pull and many other commands
are short cuts that act with both
your local repository and the remote repositories.
Image credits Steve Bennet (http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/)
Git tracks content, not files!
SHA-1 everywhere, if you need to
change something in the history,
you have to rebase and build a new history.
4. Doing it with Github
Visit http://try.github.com/
After making your first repository, set up SSH key
for convenient authentication:
https://help.github.com/articles/generating-ssh-keys
Note: Github is not the only Git hosting site,
Gitorious and Bitbucket are popular too.
Exercise:
- go to https://github.com/ottok/git-training and fork it
- look at the fork under your own Github account and
clone it to your laptop
- edit names.txt and add yours
- push changes back to Github
- in Github, do a merge request back to me
Want to put a simple shared repository on any SSH
capable server? Create a bare .git with no working files:
git init --bare
Want to have notifications when somebody commits?
Put a shell script at .git/hooks/post-receive
5. Advanced commands
Sorry, but default commands not very friendly, so get
yourself good cheat cheets and write up your common
commands once you've figured them out..

Image credits Steve Bennet (http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/)
5. Git everywhere
Would you like to store all your files in Git?
Git-annex
Diff of binary files?
Add in .git/config
[diff "odf"]
textconv=odt2txt

See also: http://www-verimag.imag.fr/~moy/opendocument/
Backup entire file systems with Git?
Bup
https://github.com/apenwarr/bup

Bug tracker and wiki contents in Git?
trac+git
Publish to the web with one commit?
gitblog
https://github.com/rsms/gitblog

Open source alternative to Dropbox based on Git?
http://sparkleshare.org/
Publish to the web with one commit?
gitblog
https://github.com/rsms/gitblog

Open source alternative to Dropbox based on Git?
http://sparkleshare.org/
Would you like others to
contribute to your software?
Provide easy forking (git clone),
easy way to develop new feature (git branch),
and an easy way to send them back (merge request).
Will Git credits replace developers CV's?
Is there anything we can't store and track in Git?
Recommended next reading:
Pro Git for $25 on Amazon
Also online at
http://git-scm.com/book
This presentation will be available at seravo.fi/blog
Contact Seravo Oy:n if you need
Linux natives to develop and administer
your Linux systems
About the company: seravo.fi
About the technologies: seravo.fi/blog

More Related Content

What's hot

Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
err
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
Rick Umali
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
Luigi De Russis
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
Nicolás Tourné
 
Git'in on Windows
Git'in on WindowsGit'in on Windows
Git'in on Windows
Stacy Vicknair
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
KMS Technology
 
How to store large binary files in git repositories
How to store large binary files in git repositoriesHow to store large binary files in git repositories
How to store large binary files in git repositories
Matt Aunger
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
Moshe Kaplan
 
Social Coding GitHub 2015
Social Coding GitHub 2015Social Coding GitHub 2015
Social Coding GitHub 2015
Kenu, GwangNam Heo
 
Github
GithubGithub
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopOpen Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Wong Hoi Sing Edison
 
Git advanced
Git advancedGit advanced
Git advanced
Peter Vandenabeele
 
Git intro hands on windows with msysgit
Git intro hands on windows with msysgitGit intro hands on windows with msysgit
Git intro hands on windows with msysgit
Geshan Manandhar
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
Ignacio Martín
 
いつやるの?Git入門
いつやるの?Git入門いつやるの?Git入門
いつやるの?Git入門
Masakazu Matsushita
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
Sébastien Saunier
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
AmilAli1
 
Git and Github workshop
Git and Github workshopGit and Github workshop
Git and Github workshop
Otto Kekäläinen
 
Git
GitGit

What's hot (20)

Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Git'in on Windows
Git'in on WindowsGit'in on Windows
Git'in on Windows
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
How to store large binary files in git repositories
How to store large binary files in git repositoriesHow to store large binary files in git repositories
How to store large binary files in git repositories
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
 
Social Coding GitHub 2015
Social Coding GitHub 2015Social Coding GitHub 2015
Social Coding GitHub 2015
 
Github
GithubGithub
Github
 
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro WorkshopOpen Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
Open Innovation Lab (OIL) - 20150227 - GIT Intro Workshop
 
Git advanced
Git advancedGit advanced
Git advanced
 
Git intro hands on windows with msysgit
Git intro hands on windows with msysgitGit intro hands on windows with msysgit
Git intro hands on windows with msysgit
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Presentacion git
Presentacion gitPresentacion git
Presentacion git
 
いつやるの?Git入門
いつやるの?Git入門いつやるの?Git入門
いつやるの?Git入門
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
 
Git and Github workshop
Git and Github workshopGit and Github workshop
Git and Github workshop
 
Git
GitGit
Git
 

Similar to Git training with Devaamo

Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
Otto Kekäläinen
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
GhadiAlGhosh
 
Git essentials
Git essentialsGit essentials
Git essentials
Otto Kekäläinen
 
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a gitVincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
VincitOy
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
Arashdeepkaur16
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
PouriaQashqai1
 
Git
GitGit
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
HuthaifaAlmaqrami1
 
Git Mastery
Git MasteryGit Mastery
Git Mastery
ShehryarSH1
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
PRIYATHAMDARISI
 
Git
GitGit
Git 101
Git 101Git 101
Git for standalone use
Git for standalone useGit for standalone use
Git for standalone use
Ikuru Kanuma
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
Betclic Everest Group Tech Team
 
Beginner's guide to git and github
Beginner's guide to git and github Beginner's guide to git and github
Beginner's guide to git and github
SahilSonar4
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
Panagiotis Papadopoulos
 
Intro to git (UT biocomputing 2015)
Intro to git (UT biocomputing 2015)Intro to git (UT biocomputing 2015)
Intro to git (UT biocomputing 2015)
chenghlee
 

Similar to Git training with Devaamo (20)

Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
 
Git essentials
Git essentialsGit essentials
Git essentials
 
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a gitVincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
Git
GitGit
Git
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
 
Git Mastery
Git MasteryGit Mastery
Git Mastery
 
setting up a repository using GIT
setting up a repository using GITsetting up a repository using GIT
setting up a repository using GIT
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
Git
GitGit
Git
 
Git 101
Git 101Git 101
Git 101
 
16 Git
16 Git16 Git
16 Git
 
Git for standalone use
Git for standalone useGit for standalone use
Git for standalone use
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Beginner's guide to git and github
Beginner's guide to git and github Beginner's guide to git and github
Beginner's guide to git and github
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Intro to git (UT biocomputing 2015)
Intro to git (UT biocomputing 2015)Intro to git (UT biocomputing 2015)
Intro to git (UT biocomputing 2015)
 

More from Otto Kekäläinen

FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and UbuntuFOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
Otto Kekäläinen
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kekäläinen
 
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and UbuntuMariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
Otto Kekäläinen
 
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
Otto Kekäläinen
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 editionTechnical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
Otto Kekäläinen
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Otto Kekäläinen
 
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
Otto Kekäläinen
 
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoFDebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
Otto Kekäläinen
 
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix themThe 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
Otto Kekäläinen
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
Otto Kekäläinen
 
Technical SEO for WordPress
Technical SEO for WordPressTechnical SEO for WordPress
Technical SEO for WordPress
Otto Kekäläinen
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
Otto Kekäläinen
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
Otto Kekäläinen
 
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsAutomatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
Otto Kekäläinen
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
Otto Kekäläinen
 
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteetWordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
Otto Kekäläinen
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
Otto Kekäläinen
 
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP ProfilingImproving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
Otto Kekäläinen
 
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environmentsMariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
Otto Kekäläinen
 
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
Otto Kekäläinen
 

More from Otto Kekäläinen (20)

FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and UbuntuFOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and UbuntuMariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
 
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 editionTechnical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
 
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoFDebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
 
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix themThe 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
 
Technical SEO for WordPress
Technical SEO for WordPressTechnical SEO for WordPress
Technical SEO for WordPress
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
 
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsAutomatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
 
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteetWordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
 
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP ProfilingImproving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
 
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environmentsMariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
 
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
 

Recently uploaded

Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 

Recently uploaded (20)

Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Git training with Devaamo

  • 1. Devaamo ry sli d es up da te d1 Otto Kekäläinen Uusi Tehdas / New Factory Tampere 29.11.2012 .1 2 . Git training with Devaamo
  • 2. Outline 1. The story of Git 2. Basic commands 3. Git internals 4. Doing it with Github 5. Advanced commands 6. Git everywhere
  • 4. Git /ɡɪt/ ”A silly, incompetent, stupid, annoying or childish person.” http://en.wiktionary.org/wiki/git
  • 5. "I'm an egotistical bastard, so I name all my projects after myself. First Linux, now Git” Linus Torvalds, PC World. 2012-07-14
  • 6. Linus needed a new source code revision manager for Linux, and none of the available open source options at the time where good enough, so he wrote his own in April 2005. Kernel 2.6.12 was the first release managed by Git and version 1.0 of Git was released in December 2005.
  • 7. Design goals of Git: ● distributed revision management ● protection against corruption, both accidental and hostile ● speed
  • 8. Popularity doubled from 2011 to 2012!
  • 9. ...but adoption would be faster if it was not so difficult to use. Originally Linus did not intend end users to use Git directly, instead he tried to delegate to somebody else the task of making the actual command line interface. We are still waiting for it... Luckily Git has been simplified and documentation has improved over time, but some Git commands still refer to Git internals that are difficult to grasp. E.g. git-push: Update remote refs along with associated objects.
  • 11. First obstacle: same terms with different meanings
  • 12. git init git add example.txt git commit -nam “First commit” # fill example.txt with text from http://git-scm.com/ git commit -nam “Second commit” git log git diff HEAD^
  • 13. git config --global user.name "John Doe" git config --global user.email johndoe@example.com
  • 14. git clone git://github.com/Seravo/events-manager-translations.git # edit files git commit -nam “Updated translation” git push git pull # edit files git commit -nam “Implemented X” git push git blame readme.txt
  • 16. Folder /.git contains everything, your / is just the working copy.
  • 17. Folder /.git contains everything, your / is just the working copy. When you commit a 2 MB file /example.png, your / will grow to 4 MB...
  • 18. When you add a file, it goes to the staging area. The file does not go into the actual history tree until the stage is committed.
  • 19. Push and pull and many other commands are short cuts that act with both your local repository and the remote repositories.
  • 20. Image credits Steve Bennet (http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/)
  • 21.
  • 22. Git tracks content, not files! SHA-1 everywhere, if you need to change something in the history, you have to rebase and build a new history.
  • 23. 4. Doing it with Github
  • 24. Visit http://try.github.com/ After making your first repository, set up SSH key for convenient authentication: https://help.github.com/articles/generating-ssh-keys Note: Github is not the only Git hosting site, Gitorious and Bitbucket are popular too.
  • 25. Exercise: - go to https://github.com/ottok/git-training and fork it - look at the fork under your own Github account and clone it to your laptop - edit names.txt and add yours - push changes back to Github - in Github, do a merge request back to me
  • 26. Want to put a simple shared repository on any SSH capable server? Create a bare .git with no working files: git init --bare Want to have notifications when somebody commits? Put a shell script at .git/hooks/post-receive
  • 28. Sorry, but default commands not very friendly, so get yourself good cheat cheets and write up your common commands once you've figured them out.. Image credits Steve Bennet (http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/)
  • 29.
  • 31. Would you like to store all your files in Git? Git-annex Diff of binary files? Add in .git/config [diff "odf"] textconv=odt2txt See also: http://www-verimag.imag.fr/~moy/opendocument/
  • 32. Backup entire file systems with Git? Bup https://github.com/apenwarr/bup Bug tracker and wiki contents in Git? trac+git
  • 33. Publish to the web with one commit? gitblog https://github.com/rsms/gitblog Open source alternative to Dropbox based on Git? http://sparkleshare.org/
  • 34. Publish to the web with one commit? gitblog https://github.com/rsms/gitblog Open source alternative to Dropbox based on Git? http://sparkleshare.org/
  • 35. Would you like others to contribute to your software? Provide easy forking (git clone), easy way to develop new feature (git branch), and an easy way to send them back (merge request).
  • 36. Will Git credits replace developers CV's?
  • 37. Is there anything we can't store and track in Git?
  • 38. Recommended next reading: Pro Git for $25 on Amazon Also online at http://git-scm.com/book This presentation will be available at seravo.fi/blog
  • 39. Contact Seravo Oy:n if you need Linux natives to develop and administer your Linux systems About the company: seravo.fi About the technologies: seravo.fi/blog