SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
Git & GitHub for
beginners !
@paal_ringstad
INTRO TIME "
1. What brought you here
tonight
2. One passion of yours
3. Your lovely name
Let’s make it easy
local vs. online
Before: Versioning
SETUP
Git local commands: initialising
$ git config --global user.name “your name”
$ git config --global user.email “your email”
$ git init
Command Line
One folder
Terminal commands: basics
$ pwd
$ ls
$ cd project_name
$ cd ..
$ mkdir project_name
$ touch file_name
Commit
Git local commands: commit
$ git status
$ git diff
$ git add file_name
$ git commit -m “a meaningful message”
$ git log
Branches
master
master branch
new branch
$ git branch branch_name
$ git checkout branch_name
$ git diff master branch_name
$ git merge branch_name
$ git branch -d branch_name
git local commands: branching
Remote
text vs. code
git remote commands
$ git remote -v
$ git clone link (HTTPS)
$ git push origin <branch_name>
$ git pull origin <branch_name>
+
Pull Request
Please accept my pull request
PULL REQUESTS
Challenges #
The following slides are challenges to solve with
your workshop buddy (pair programming).
Part 1 - Git
Using git via the command line to create a new
project and version it
challenge 1
Open your terminal. Using the command line, create a
new folder on your Desktop. Jump into this newly-
created folder, then create a new HTML file.The
convention is to call this file “index.html”.
How you do know the file was successfully created?
challenge 2
If not done already, set your identity in git. Then initialise
git inside the current folder. Make a first commit. By
convention, the commit message for the first commit is:
“initial commit”
challenge 3
Drag and drop the HMTL file in your text / code editor
(Sublime Text). Then write some stuff in it. Finally, save
the file! How do you review what changed in the HTML
file using git? Make a new commit to explain what
changed.
challenge 4
Create a new branch and jump onto that branch. How
do you know how many branches there are in the
project? How do you know which branch you are on?
challenge 5
Make some changes to the HTML file again. Save it!
Commit these changes onto the branch. Go back to the
master branch.
What do you notice in your HTML file?
challenge 6
Merge your branch onto master, then delete the branch
your previously created so that you don’t have already
used branches lagging behind.
Again, what do you notice in your HTML file?
challenge 7
Using terminal commands, exit your current repository
and go back to the Desktop repository.
Part 2 - Github
Using git along with GitHub to collaborate on
an existing project online.
challenge 8
Find out what your Github username is. Then write it
down in the comment section of the Meetup page of
this event (where I shared the link of these slides). Let
me know when it’s done, I’ll add you to the project on
GitHub. $
challenge 9
Click on this link to accept my invitation to the GitHub
repository: http://bit.ly/wagonmelgit. You’re now a
collaborator of this repository and have push and pull
access.
+
challenge 10
Clone a copy of this repository using the HTTPS link:
http://bit.ly/gitgit1 - Then jump into that repository. For
your information, cloning a project from Github
automatically initialises git.
+
challenge 11
Create a new branch, then update the HTML file
according to the instructions in it and save it. Finally,
commit the changes on that branch.
+
challenge 12
How do you list the remote repositories linked to your
project? You need to find Github’s nickname to be able
to push your branch there. Using git, push your branch
to GitHub.
+
final challenge "
Go to the repository page on Github:
https://github.com/CharlyMartin/github_workshop
Open a Pull Request for me to review and let me know
when it’s done $
+
congrats %
If your Pull Request got accepted, your changes are
added to the codebase and available online forever!
https://charlymartin.github.io/github_workshop/
Le Wagon brings technical skills
to creative people
Program outline
Ruby, command line & git
Software engineering
Database & SQL
HTML, CSS, JavaScript
Rails, Heroku
Github flow
Best bootcamp in the world
Apply at lewagon.com/melbourne

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris Wanstrath
 
Git tutorial
Git tutorial Git tutorial
Git tutorial
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
GIT | Distributed Version Control System
GIT | Distributed Version Control SystemGIT | Distributed Version Control System
GIT | Distributed Version Control System
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Git & Github for beginners
Git & Github for beginnersGit & Github for beginners
Git & Github for beginners
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Git 101 Workshop
Git 101 WorkshopGit 101 Workshop
Git 101 Workshop
 
Git101
Git101Git101
Git101
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Git & GitHub WorkShop
Git & GitHub WorkShopGit & GitHub WorkShop
Git & GitHub WorkShop
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
 
From svn to git
From svn to gitFrom svn to git
From svn to git
 

Similar a Github - Le Wagon Melbourne

Similar a Github - Le Wagon Melbourne (20)

16 Git
16 Git16 Git
16 Git
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
 
Git Init (Introduction to Git)
Git Init (Introduction to Git)Git Init (Introduction to Git)
Git Init (Introduction to Git)
 
Git/GitHub
Git/GitHubGit/GitHub
Git/GitHub
 
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Git presentation
Git presentationGit presentation
Git presentation
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
Openstack contribution process
Openstack contribution processOpenstack contribution process
Openstack contribution process
 
OpenStack Contribution Process
OpenStack Contribution ProcessOpenStack Contribution Process
OpenStack Contribution Process
 
git & GitHub workshop
git & GitHub workshopgit & GitHub workshop
git & GitHub workshop
 
Git setuplinux
Git setuplinuxGit setuplinux
Git setuplinux
 
GitSetupLinux
GitSetupLinuxGitSetupLinux
GitSetupLinux
 
Intro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucketIntro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucket
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
 
Git and Github slides.pdf
Git and Github slides.pdfGit and Github slides.pdf
Git and Github slides.pdf
 
Git and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slideGit and Github workshop ppt slide by slide
Git and Github workshop ppt slide by slide
 

Más de Paal Ringstad

Command cheatsheets windows
Command cheatsheets windowsCommand cheatsheets windows
Command cheatsheets windowsPaal Ringstad
 
Command cheatsheets mac
Command cheatsheets macCommand cheatsheets mac
Command cheatsheets macPaal Ringstad
 
JS - ES6 Javascript for Beginners
JS - ES6 Javascript for BeginnersJS - ES6 Javascript for Beginners
JS - ES6 Javascript for BeginnersPaal Ringstad
 
HTML & CSS - Le Wagon Bootcamp
HTML & CSS - Le Wagon BootcampHTML & CSS - Le Wagon Bootcamp
HTML & CSS - Le Wagon BootcampPaal Ringstad
 
Le Wagon Australia Workshop
Le Wagon Australia WorkshopLe Wagon Australia Workshop
Le Wagon Australia WorkshopPaal Ringstad
 
HTML & CSS - Le Wagon Bootcamp
HTML & CSS - Le Wagon BootcampHTML & CSS - Le Wagon Bootcamp
HTML & CSS - Le Wagon BootcampPaal Ringstad
 

Más de Paal Ringstad (7)

Command cheatsheets windows
Command cheatsheets windowsCommand cheatsheets windows
Command cheatsheets windows
 
Command cheatsheets mac
Command cheatsheets macCommand cheatsheets mac
Command cheatsheets mac
 
Ruby for Beginners
Ruby for BeginnersRuby for Beginners
Ruby for Beginners
 
JS - ES6 Javascript for Beginners
JS - ES6 Javascript for BeginnersJS - ES6 Javascript for Beginners
JS - ES6 Javascript for Beginners
 
HTML & CSS - Le Wagon Bootcamp
HTML & CSS - Le Wagon BootcampHTML & CSS - Le Wagon Bootcamp
HTML & CSS - Le Wagon Bootcamp
 
Le Wagon Australia Workshop
Le Wagon Australia WorkshopLe Wagon Australia Workshop
Le Wagon Australia Workshop
 
HTML & CSS - Le Wagon Bootcamp
HTML & CSS - Le Wagon BootcampHTML & CSS - Le Wagon Bootcamp
HTML & CSS - Le Wagon Bootcamp
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 

Último (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 

Github - Le Wagon Melbourne

  • 1. Git & GitHub for beginners ! @paal_ringstad
  • 2. INTRO TIME " 1. What brought you here tonight 2. One passion of yours 3. Your lovely name
  • 7. Git local commands: initialising $ git config --global user.name “your name” $ git config --global user.email “your email” $ git init
  • 10.
  • 11. Terminal commands: basics $ pwd $ ls $ cd project_name $ cd .. $ mkdir project_name $ touch file_name
  • 13.
  • 14. Git local commands: commit $ git status $ git diff $ git add file_name $ git commit -m “a meaningful message” $ git log
  • 18. $ git branch branch_name $ git checkout branch_name $ git diff master branch_name $ git merge branch_name $ git branch -d branch_name git local commands: branching
  • 21. git remote commands $ git remote -v $ git clone link (HTTPS) $ git push origin <branch_name> $ git pull origin <branch_name> +
  • 23. Please accept my pull request PULL REQUESTS
  • 24. Challenges # The following slides are challenges to solve with your workshop buddy (pair programming).
  • 25. Part 1 - Git Using git via the command line to create a new project and version it
  • 26. challenge 1 Open your terminal. Using the command line, create a new folder on your Desktop. Jump into this newly- created folder, then create a new HTML file.The convention is to call this file “index.html”. How you do know the file was successfully created?
  • 27. challenge 2 If not done already, set your identity in git. Then initialise git inside the current folder. Make a first commit. By convention, the commit message for the first commit is: “initial commit”
  • 28. challenge 3 Drag and drop the HMTL file in your text / code editor (Sublime Text). Then write some stuff in it. Finally, save the file! How do you review what changed in the HTML file using git? Make a new commit to explain what changed.
  • 29. challenge 4 Create a new branch and jump onto that branch. How do you know how many branches there are in the project? How do you know which branch you are on?
  • 30. challenge 5 Make some changes to the HTML file again. Save it! Commit these changes onto the branch. Go back to the master branch. What do you notice in your HTML file?
  • 31. challenge 6 Merge your branch onto master, then delete the branch your previously created so that you don’t have already used branches lagging behind. Again, what do you notice in your HTML file?
  • 32. challenge 7 Using terminal commands, exit your current repository and go back to the Desktop repository.
  • 33. Part 2 - Github Using git along with GitHub to collaborate on an existing project online.
  • 34. challenge 8 Find out what your Github username is. Then write it down in the comment section of the Meetup page of this event (where I shared the link of these slides). Let me know when it’s done, I’ll add you to the project on GitHub. $
  • 35. challenge 9 Click on this link to accept my invitation to the GitHub repository: http://bit.ly/wagonmelgit. You’re now a collaborator of this repository and have push and pull access. +
  • 36. challenge 10 Clone a copy of this repository using the HTTPS link: http://bit.ly/gitgit1 - Then jump into that repository. For your information, cloning a project from Github automatically initialises git. +
  • 37. challenge 11 Create a new branch, then update the HTML file according to the instructions in it and save it. Finally, commit the changes on that branch. +
  • 38. challenge 12 How do you list the remote repositories linked to your project? You need to find Github’s nickname to be able to push your branch there. Using git, push your branch to GitHub. +
  • 39. final challenge " Go to the repository page on Github: https://github.com/CharlyMartin/github_workshop Open a Pull Request for me to review and let me know when it’s done $ +
  • 40. congrats % If your Pull Request got accepted, your changes are added to the codebase and available online forever! https://charlymartin.github.io/github_workshop/
  • 41. Le Wagon brings technical skills to creative people
  • 42. Program outline Ruby, command line & git Software engineering Database & SQL HTML, CSS, JavaScript Rails, Heroku Github flow
  • 43. Best bootcamp in the world