SlideShare ist ein Scribd-Unternehmen logo
1 von 61
git  --intro lenin.gil lenin.gif lenin.budet.git
History ,[object Object]
Brief history ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Предпосылки ,[object Object],[object Object],[object Object]
Problems ,[object Object],[object Object],[object Object],[object Object],[object Object]
“ git ” ? ,[object Object],[object Object],[object Object],[object Object],[object Object]
PRINCIPLES ,[object Object]
Design criteria ,[object Object],[object Object],[object Object],[object Object]
Characteristics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Characteristics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
INTERNALS ,[object Object]
Storage model ,[object Object],[object Object],[object Object],[object Object],[object Object]
Everything has hash ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Objects ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Blob Object ,[object Object],[object Object]
Tree Object ,[object Object],[object Object]
Commit Object ,[object Object]
Commit Object ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Object Model
REVISION HISTORY ,[object Object]
History is a DAG ,[object Object],[object Object]
History is a DAG To keep all the information and history on the three versions of this tree, Git stores 16  immutable ,  signed ,  compressed  objects.
BRANCHES ,[object Object]
Objects vs References ,[object Object],[object Object],[object Object],[object Object]
Branches ,[object Object],[object Object],[object Object],[object Object]
The Model
Local branching
Local branching
Local branching ,[object Object]
Local branching ,[object Object]
What to do with fast branches ,[object Object],[object Object],[object Object],[object Object]
Real workflow example
PRACTICE : LOCAL REPOSITORY ,[object Object]
git init c:gt;  mkdir test c:gt;  cd test c:est>  git init Initialized empty Git repository in c:/test/.git/
git add c:est>  dir /b cities.cpp cities.h c:est>  git add cities.h c:est>  git status # On branch master # # Initial commit # # Changes to be committed: #  (use &quot;git rm --cached <file>...&quot; to unstage) # #  new file:  cities.h # # Untracked files: #  (use &quot;git add <file>...&quot; to include in what will be committed) # #  cities.cpp
git commit c:est>  git commit -m &quot;first commit&quot; [master (root-commit) 207b79d] first commit 1 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 cities.h c:est>  git status # On branch master # Untracked files: #  (use &quot;git add <file>...&quot; to include in what will be committed) # #  cities.cpp nothing added to commit but untracked files present (use &quot;git add&quot; to track)
git commit -a c:est>  git status # On branch master nothing to commit (working directory clean) c:est>  echo &quot;aaa&quot; > cities.cpp c:est>  git commit -m &quot;test&quot; # On branch master # Changed but not updated: #  (use &quot;git add <file>...&quot; to update what will be committed) #  (use &quot;git checkout -- <file>...&quot; to discard changes in working directory) # #  modified:  cities.cpp # no changes added to commit (use &quot;git add&quot; and/or &quot;git commit -a&quot;) c:est>  git commit -m &quot;test&quot; -a [master 6eaf41e] test 1 files changed, 1 insertions(+), 210 deletions(-) rewrite cities.cpp (100%)
change-> add -> commit
git log c:est>  git commit Aborting commit due to empty commit message. c:est>  git log commit 57e762203d0b522fa3a47afcc907af313b5d6d78 Author: Dmitry Guyvoronsky <dmitry.guyvoronsky@gmail.com> Date:  Fri Feb 25 16:18:15 2011 +0200 second commit commit 207b79dd89469a75c9e92a38c4b3eac904bea603 Author: Dmitry Guyvoronsky <dmitry.guyvoronsky@gmail.com> Date:  Fri Feb 25 16:15:17 2011 +0200 first commit c:est>  git log --pretty=oneline 57e762203d0b522fa3a47afcc907af313b5d6d78 second commit 207b79dd89469a75c9e92a38c4b3eac904bea603 first commit
git branch c:est>  git status # On branch master nothing to commit (working directory clean) c:est>  git branch * master c:est>  git branch mytest c:est>  git branch * master mytest c:est>  git checkout mytest Switched to branch 'mytest' c:est>  git branch master * mytest
git checkout -b c:est>  git branch master * mytest c:est>  git checkout -b another Switched to a new branch 'another' c:est>  git branch * another master mytest
DISTRIBUTED WORKFLOW ,[object Object]
Cloning ,[object Object],[object Object]
Remote branches ,[object Object],[object Object]
Remote branches ,[object Object]
Remote branches ,[object Object],[object Object],[object Object]
Just for your information ,[object Object]
git clone c:est>  git clone git@dreamiurg.unfuddle.com:dreamiurg/test.git Initialized empty Git repository in c:/test/test/.git/ remote: Counting objects: 10, done. remote: Compressing objects: 100% (10/10), done. remote: Total 10 (delta 1), reused 0 (delta 0) Receiving objects: 100% (10/10), 5.69 KiB, done. Resolving deltas: 100% (1/1), done.
Local branches are yours only c:estest>  git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master c:estest>  git checkout -b working Switched to a new branch 'working' c:estest>  git branch -a master * working remotes/origin/HEAD -> origin/master remotes/origin/master
git fetch ; git merge c:estest>  git st # On branch master nothing to commit (working directory clean) c:estest>  git fetch remote: Counting objects: 4, done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. From dreamiurg.unfuddle.com:dreamiurg/test 3ade0ca..6309355  master  -> origin/master c:estest>  git st # On branch master # Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. # nothing to commit (working directory clean) c:estest>  git merge origin/master Updating 3ade0ca..6309355 Fast-forward new.cpp |  1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 new.cpp
git pull = git fetch ; git merge c:estest>  git pull remote: Counting objects: 5, done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. From dreamiurg.unfuddle.com:dreamiurg/test 6309355..a4212c7  master  -> origin/master Updating 6309355..a4212c7 Fast-forward new.cpp |  1 + 1 files changed, 1 insertions(+), 0 deletions(-)
GUIs ,[object Object]
Graphical interfaces ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Graphical interfaces - gitk
Graphical interfaces - TortoiseGit
Graphical interfaces - SmartGit
COMPARISON ,[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
…  investigate it yourself ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Q & A ,[object Object],[object Object],[object Object]
[email_address] http://demiurg.com.ua

Weitere ähnliche Inhalte

Was ist angesagt?

Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
Robert Lee-Cann
 

Was ist angesagt? (20)

Teaching a Designer to Use GitHub
Teaching a Designer to Use GitHubTeaching a Designer to Use GitHub
Teaching a Designer to Use GitHub
 
Codifying the Build and Release Process with a Jenkins Pipeline Shared Library
Codifying the Build and Release Process with a Jenkins Pipeline Shared LibraryCodifying the Build and Release Process with a Jenkins Pipeline Shared Library
Codifying the Build and Release Process with a Jenkins Pipeline Shared Library
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Travis CI
Travis CITravis CI
Travis CI
 
Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)
 
Continuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL ServerContinuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL Server
 
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-CodeSD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
SD DevOps Meet-up - Jenkins 2.0 and Pipeline-as-Code
 
An introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket PipelinesAn introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket Pipelines
 
calmio-cicd-containers
calmio-cicd-containerscalmio-cicd-containers
calmio-cicd-containers
 
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 PipelineDelivery Pipeline as Code: using Jenkins 2.0 Pipeline
Delivery Pipeline as Code: using Jenkins 2.0 Pipeline
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Continuous integration ( jen kins travis ci)
Continuous integration ( jen kins  travis ci)Continuous integration ( jen kins  travis ci)
Continuous integration ( jen kins travis ci)
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
 
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
JavaCro'14 - Continuous delivery of Java EE applications with Jenkins and Doc...
 
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
 
How Docker simplifies CI/CD
How Docker simplifies CI/CDHow Docker simplifies CI/CD
How Docker simplifies CI/CD
 
Integrating Git, Gerrit and Jenkins/Hudson with Mylyn
Integrating Git, Gerrit and Jenkins/Hudson with MylynIntegrating Git, Gerrit and Jenkins/Hudson with Mylyn
Integrating Git, Gerrit and Jenkins/Hudson with Mylyn
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
 
Rundeck + Nexus (from Nexus Live on June 5, 2014)
Rundeck + Nexus (from Nexus Live on June 5, 2014)Rundeck + Nexus (from Nexus Live on June 5, 2014)
Rundeck + Nexus (from Nexus Live on June 5, 2014)
 

Andere mochten auch

Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)
Jacob Kaplan-Moss
 
Git For The Android Developer
Git For The Android DeveloperGit For The Android Developer
Git For The Android Developer
Effective
 
Mes 概論 第二周
Mes 概論   第二周Mes 概論   第二周
Mes 概論 第二周
信宏 陳
 
DATAS Technolody may2016 eng AK
DATAS Technolody may2016 eng AKDATAS Technolody may2016 eng AK
DATAS Technolody may2016 eng AK
Alexey Kononenko
 

Andere mochten auch (20)

Capybara
CapybaraCapybara
Capybara
 
Outside-In Development With Cucumber
Outside-In Development With CucumberOutside-In Development With Cucumber
Outside-In Development With Cucumber
 
A quick python_tour
A quick python_tourA quick python_tour
A quick python_tour
 
Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)
 
Prepare for JDK 9
Prepare for JDK 9Prepare for JDK 9
Prepare for JDK 9
 
Git for the Android Developer
Git for the Android DeveloperGit for the Android Developer
Git for the Android Developer
 
.Git for WordPress Developers
.Git for WordPress Developers.Git for WordPress Developers
.Git for WordPress Developers
 
Evernote
EvernoteEvernote
Evernote
 
Essential git for developers
Essential git for developersEssential git for developers
Essential git for developers
 
Git for Android Developers
Git for Android DevelopersGit for Android Developers
Git for Android Developers
 
Git For The Android Developer
Git For The Android DeveloperGit For The Android Developer
Git For The Android Developer
 
Essential git for developers
Essential git for developersEssential git for developers
Essential git for developers
 
Mes 概論 第二周
Mes 概論   第二周Mes 概論   第二周
Mes 概論 第二周
 
Two scoops of Django - Security Best Practices
Two scoops of Django - Security Best PracticesTwo scoops of Django - Security Best Practices
Two scoops of Django - Security Best Practices
 
[Easy] How to use Evernote: Beginner's Guide
[Easy]  How to use Evernote: Beginner's Guide[Easy]  How to use Evernote: Beginner's Guide
[Easy] How to use Evernote: Beginner's Guide
 
The WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpecThe WHY behind TDD/BDD and the HOW with RSpec
The WHY behind TDD/BDD and the HOW with RSpec
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
DATAS Technolody may2016 eng AK
DATAS Technolody may2016 eng AKDATAS Technolody may2016 eng AK
DATAS Technolody may2016 eng AK
 
Git for the Android Developer
Git for the Android DeveloperGit for the Android Developer
Git for the Android Developer
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 

Ähnlich wie Introduction to Git for developers

3 Git
3 Git3 Git

Ähnlich wie Introduction to Git for developers (20)

Git, Fast and Distributed Source Code Management
Git, Fast and Distributed Source Code ManagementGit, Fast and Distributed Source Code Management
Git, Fast and Distributed Source Code Management
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
 
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
 
Version control with GIT
Version control with GITVersion control with GIT
Version control with GIT
 
Git basics with notes
Git basics with notesGit basics with notes
Git basics with notes
 
That's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETICThat's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETIC
 
Git hub
Git hubGit hub
Git hub
 
Migrating To GitHub
Migrating To GitHub  Migrating To GitHub
Migrating To GitHub
 
Git_new.pptx
Git_new.pptxGit_new.pptx
Git_new.pptx
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
3 Git
3 Git3 Git
3 Git
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdf
 
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
 
Gitting better
Gitting betterGitting better
Gitting better
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Git intermediate workshop slides v1.4
Git intermediate workshop slides v1.4Git intermediate workshop slides v1.4
Git intermediate workshop slides v1.4
 
Understanding and Using Git at Eclipse
Understanding and Using Git at EclipseUnderstanding and Using Git at Eclipse
Understanding and Using Git at Eclipse
 

Kürzlich hochgeladen

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
Victor 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 2024
Victor Rentea
 
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
 
+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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)
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
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, ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
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
 
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
 
+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...
 

Introduction to Git for developers

  • 1. git --intro lenin.gil lenin.gif lenin.budet.git
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 20.
  • 21.
  • 22. History is a DAG To keep all the information and history on the three versions of this tree, Git stores 16 immutable , signed , compressed objects.
  • 23.
  • 24.
  • 25.
  • 29.
  • 30.
  • 31.
  • 33.
  • 34. git init c:gt; mkdir test c:gt; cd test c:est> git init Initialized empty Git repository in c:/test/.git/
  • 35. git add c:est> dir /b cities.cpp cities.h c:est> git add cities.h c:est> git status # On branch master # # Initial commit # # Changes to be committed: # (use &quot;git rm --cached <file>...&quot; to unstage) # # new file: cities.h # # Untracked files: # (use &quot;git add <file>...&quot; to include in what will be committed) # # cities.cpp
  • 36. git commit c:est> git commit -m &quot;first commit&quot; [master (root-commit) 207b79d] first commit 1 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 cities.h c:est> git status # On branch master # Untracked files: # (use &quot;git add <file>...&quot; to include in what will be committed) # # cities.cpp nothing added to commit but untracked files present (use &quot;git add&quot; to track)
  • 37. git commit -a c:est> git status # On branch master nothing to commit (working directory clean) c:est> echo &quot;aaa&quot; > cities.cpp c:est> git commit -m &quot;test&quot; # On branch master # Changed but not updated: # (use &quot;git add <file>...&quot; to update what will be committed) # (use &quot;git checkout -- <file>...&quot; to discard changes in working directory) # # modified: cities.cpp # no changes added to commit (use &quot;git add&quot; and/or &quot;git commit -a&quot;) c:est> git commit -m &quot;test&quot; -a [master 6eaf41e] test 1 files changed, 1 insertions(+), 210 deletions(-) rewrite cities.cpp (100%)
  • 38. change-> add -> commit
  • 39. git log c:est> git commit Aborting commit due to empty commit message. c:est> git log commit 57e762203d0b522fa3a47afcc907af313b5d6d78 Author: Dmitry Guyvoronsky <dmitry.guyvoronsky@gmail.com> Date: Fri Feb 25 16:18:15 2011 +0200 second commit commit 207b79dd89469a75c9e92a38c4b3eac904bea603 Author: Dmitry Guyvoronsky <dmitry.guyvoronsky@gmail.com> Date: Fri Feb 25 16:15:17 2011 +0200 first commit c:est> git log --pretty=oneline 57e762203d0b522fa3a47afcc907af313b5d6d78 second commit 207b79dd89469a75c9e92a38c4b3eac904bea603 first commit
  • 40. git branch c:est> git status # On branch master nothing to commit (working directory clean) c:est> git branch * master c:est> git branch mytest c:est> git branch * master mytest c:est> git checkout mytest Switched to branch 'mytest' c:est> git branch master * mytest
  • 41. git checkout -b c:est> git branch master * mytest c:est> git checkout -b another Switched to a new branch 'another' c:est> git branch * another master mytest
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48. git clone c:est> git clone git@dreamiurg.unfuddle.com:dreamiurg/test.git Initialized empty Git repository in c:/test/test/.git/ remote: Counting objects: 10, done. remote: Compressing objects: 100% (10/10), done. remote: Total 10 (delta 1), reused 0 (delta 0) Receiving objects: 100% (10/10), 5.69 KiB, done. Resolving deltas: 100% (1/1), done.
  • 49. Local branches are yours only c:estest> git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master c:estest> git checkout -b working Switched to a new branch 'working' c:estest> git branch -a master * working remotes/origin/HEAD -> origin/master remotes/origin/master
  • 50. git fetch ; git merge c:estest> git st # On branch master nothing to commit (working directory clean) c:estest> git fetch remote: Counting objects: 4, done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. From dreamiurg.unfuddle.com:dreamiurg/test 3ade0ca..6309355 master -> origin/master c:estest> git st # On branch master # Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. # nothing to commit (working directory clean) c:estest> git merge origin/master Updating 3ade0ca..6309355 Fast-forward new.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 new.cpp
  • 51. git pull = git fetch ; git merge c:estest> git pull remote: Counting objects: 5, done. remote: Compressing objects: 100% (2/2), done. remote: Total 3 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. From dreamiurg.unfuddle.com:dreamiurg/test 6309355..a4212c7 master -> origin/master Updating 6309355..a4212c7 Fast-forward new.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
  • 52.
  • 53.
  • 55. Graphical interfaces - TortoiseGit
  • 57.
  • 58.
  • 59.
  • 60.