SlideShare ist ein Scribd-Unternehmen logo
1 von 71
GIT from n00b BeerCamp+ Nov 9, 2011 Sang Dee Gallery
Introduction my self $whois @amaudy
Introduction my self $whois @amaudy Just web programmer
Introduction my self $whois @amaudy Just web programmer (PHP, jQuery, Drupal/Wordpress, Rails)
What is GIT? GIT is an  Open source  distributed version control
What is GIT? GIT is an   Open source   distributed version control
What is GIT? GIT is an  Open source  distributed   version control
What is GIT? GIT is an  Open source  distributed   version control
Distributed
Distributed Do everything (mostly) in local
Do everything in local - Commit (save what you did)
Do everything in local - Commit (save what you did) - View file or project history
Do everything in local - Commit (save what you did) - View file or project history - Switch to other branch
Do everything in local - Commit (save what you did) - View file or project history - Switch to other branch - Merge branches
What is Version Control? What is Version Control? History of your Project
What is Version Control? What is Version Control? History of your Project - Features
What is Version Control? What is Version Control? History of your Project - Features - Bug fixed
What is Version Control? What is Version Control? History of your Project - Features - Bug fixed - Experiment your idea
Benefit of Version Control
Benefit of Version Control - Collaboration
Benefit of Version Control - Collaboration - Programmer&Designer
Benefit of Version Control - Collaboration - Programmer&Designer - Programmer&Programmer
Benefit of Version Control - Collaboration - Programmer&Designer - Programmer&Programmer - Track your work
Problem before not use GIT
Problem before not use GIT - Nobody know who modified files
Problem before not use GIT - Nobody know who modified files - Nobody know who add/delete files
Problem before not use GIT - Nobody know who modified files - Nobody know who add/delete files - Project manager of team members  don't know what you do in code
Problem before not use GIT - Nobody know who modified files - Nobody know who add/delete files - Project manager of team members  don't know what you do in code - Nobody know who to blame when something went wrong
What I like on GIT? - Fast
What I like on GIT? - Fast - No server (commit, diff, branch)
What I like on GIT? - Fast - No server (commit, diff, branch) - Easy to use
What I like on GIT? - Fast - No server (commit, diff, branch) - Easy to use - Many choice of GUI client
Get start on GIT
Installation Ubuntu sudo apt-get install git-core
Installation Ubuntu sudo apt-get install git-core Mac Use .dmg file
Installation Ubuntu sudo apt-get install git-core Mac Use .dmg file Windows msysgit
Configuration
Configuration git config –global user.name “your name”
Configuration git config –global user.name “your name” git config –global user.email “foo@bar.com”
Configuration git config –global user.name “your name” git config –global user.email “foo@bar.com” git config –global colour.ui “auto” git config –list
Get repository Create on local git init
Get repository git clone https://github.com/twitter/bootstrap.git Create on local Clone from remote machine git init
Add files/directory
Add files/directory git add .
Add files/directory git add . git add somefile.php
Add files/directory git add . git add somefile.php git add *.js *.css
Commit your work git commit -m 'I just did something cool'
View history git log
GIT Branches
GIT Branches - Do something different in project
GIT Branches - Do something different in project - Separate from original code
GIT Branches - Do something different in project - Separate from original code master
GIT Branches - Do something new for different - Separate from original code master development
GIT Branches - Do something new for different - Separate from original code master development theme2
Create branch git branch development
Create branch git branch development git checkout -b development
Create branch git branch development git checkout -b development /* development = name of branch */
Switch between branch git checkout development
Switch between branch git checkout development git checkout master
My work flow mkdir projectx
My work flow mkdir projectx cd projectx
My work flow mkdir projectx cd projectx git init
My work flow mkdir projectx cd projectx git init gedit .gitignore
My work flow mkdir projectx cd projectx git init gedit .gitignore git add .
My work flow mkdir projectx cd projectx git init gedit .gitignore git add . git commit -m 'start Project X'
Collaborate with team
Collaborate with team git add origin git@host.com:path/to/repository.git
Your co-worker flow git clone git@host.com:path/to/repository.git gedit index.php git add index.php git commit -m 'add index.php' git push origin master
My work flow git fetch git checkout master git merge origin/master
Demo
Spread BeerCamp - Tweet - Facebook - Blog - Invite your colleague

Weitere Àhnliche Inhalte

Was ist angesagt?

Introduction to Gitlab
Introduction to GitlabIntroduction to Gitlab
Introduction to Gitlab
Julien Pivotto
 
Open Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git HubOpen Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git Hub
Nick Quaranto
 

Was ist angesagt? (20)

Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
 
Git advanced
Git advancedGit advanced
Git advanced
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Git basics
Git basicsGit basics
Git basics
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
Git
GitGit
Git
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Git and Github workshop
Git and Github workshopGit and Github workshop
Git and Github workshop
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
Git 101
Git 101Git 101
Git 101
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
 
Introduction to Gitlab
Introduction to GitlabIntroduction to Gitlab
Introduction to Gitlab
 
Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
Open Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git HubOpen Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git Hub
 

Ähnlich wie GIT from n00b

Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Somkiat Puisungnoen
 
Git Workshop : Getting Started
Git Workshop : Getting StartedGit Workshop : Getting Started
Git Workshop : Getting Started
Wildan Maulana
 
3 Git
3 Git3 Git
Enterprise git
Enterprise gitEnterprise git
Enterprise git
Pedro Melo
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
Victor Wong
 

Ähnlich wie GIT from n00b (20)

Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)Git Ninja KT (GitHub to GitLab)
Git Ninja KT (GitHub to GitLab)
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Why Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysWhy Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anyways
 
Git Workshop : Getting Started
Git Workshop : Getting StartedGit Workshop : Getting Started
Git Workshop : Getting Started
 
Open Source_Git.pptx
Open Source_Git.pptxOpen Source_Git.pptx
Open Source_Git.pptx
 
Introduction to git & github
Introduction to git & githubIntroduction to git & github
Introduction to git & github
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git and github
Git and githubGit and github
Git and github
 
Git: be social
Git: be socialGit: be social
Git: be social
 
Improving your workflow with git
Improving your workflow with gitImproving your workflow with git
Improving your workflow with git
 
Git: Why And How to
Git: Why And How toGit: Why And How to
Git: Why And How to
 
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
 
3 Git
3 Git3 Git
3 Git
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
 
Enterprise git
Enterprise gitEnterprise git
Enterprise git
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHub
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
 
MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!
MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!
MongoDB World 2019 Builder's Fest - Ready, Git set ... Go!
 
14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx
 

KĂŒrzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

KĂŒrzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 

GIT from n00b