SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
Using	
  Git	
  101	
  

Sebas/en	
  Goasguen	
  	
  
     @sebgoa	
  
        	
  
Outline	
  
•      Intro	
  to	
  version	
  control	
  and	
  Git	
  
•      Crea/ng	
  your	
  first	
  git	
  repo	
  using	
  Gist	
  
•      Cloning	
  the	
  CloudStack	
  repo	
  
•      Managing	
  branches	
  
•      Making	
  your	
  first	
  commit	
  
•      Applying	
  a	
  patch	
  
	
  
                           NB:	
  Check	
  the	
  footnotes	
  for	
  addi/onal	
  informa/on	
  
                                                               	
  
                                                             	
  
  	
  	
   	
  	
   	
  	
   	
  	
   	
  	
  Version	
  Control
                                                                          	
  
•  Revision	
  control	
  (a.k.a	
  version	
  control)	
  is	
  the	
  
   management	
  of	
  modifica/ons	
  of	
  digital	
  
   informa/on.	
  
•  In	
  the	
  context	
  of	
  soMware	
  engineering	
  it	
  
   represents	
  the	
  management	
  of	
  the	
  mul-ple	
  
   versions	
  of	
  a	
  so3ware	
  as	
  it	
  evolves.	
  
•  In	
  other	
  terms	
  it	
  tracks	
  changes	
  in	
  the	
  source	
  
   code.	
  
                           hOp://en.wikipedia.org/wiki/Revision_control
                                                                      	
  
                                                	
  
                                                  	
  
 	
   	
   	
   	
  	
   	
  	
   	
  	
  Version	
  Control	
  Systems
                                                                            	
  
•  Historically:	
  
   –  Centralized	
  systems	
  used	
  
   –  Concurrent	
  Version	
  System	
  (CVS)	
  
   –  Subversion	
  (SVN)	
  
•  Currently:	
  
   –  Distributed	
  version	
  control	
  	
  
   –  Git	
  (2005)	
  
   –  Mercurial/hg	
  
                                 hOp://cvs.nongnu.org     	
  
                              hOp://subversion.apache.org        	
  
                                  hOp://git-­‐scm.com	
  
                              hOp://mercurial.selenic.com      	
  
                                                	
  
Workflow	
  
                                        •  Developers	
  clone	
  a	
  
                                           central	
  repository	
  
                                        •  Local	
  repository	
  is	
  a	
  
                                           working	
  copy	
  
                                        •  Updates	
  are	
  made	
  
                                           locally	
  (fast)	
  
                                        •  When	
  done,	
  changes	
  
                                           are	
  pushed	
  back	
  to	
  
                                           master	
  
                 	
  
                 	
  
                                        •  Developers	
  could	
  push/
hOp://i.stack.imgur.com/9IW5z.png
                 	
  
                                 	
  
                                           pull	
  to	
  each	
  other	
  	
  
                  	
  
  	
  Ge]ng	
  Git
                                          	
  
•  Apache	
  CloudStack	
  (ACS)	
  uses	
  Git	
  as	
  
   distributed	
  version	
  control	
  system	
  
•  Install	
  git	
  on	
  your	
  machine.	
  Depending	
  on	
  
   your	
  OS	
  and	
  package	
  manager:	
  

 ! !#yum install git-core!
 ! !#apt-get install git!           	
  
                                    	
  
                                    	
  


 ! !#port install git-core!
 	
   	
  	
   	
  	
   	
  	
  Tour	
  GitHub	
  
                                •  Check	
  the	
  publicly	
  
                                   accessible	
  repositories	
  
                                •  Create	
  an	
  account	
  

                                   Exercise:	
  
                                   •  Check	
  Gist	
  
                                   •  Put	
  a	
  document	
  under	
  
                                        revision	
  control	
  
                              	
   	
  
                             	
  
              hOps://github.com/repositories	
  
                 hOps://gist.github.com	
  
                             	
  
 	
  Create	
  a	
  Gist
                                            	
  




                                             	
  
                                             	
  
Copy/Paste	
  code	
  or	
  text	
  in	
  the	
  main	
  window,	
  add	
  a	
  decrip/on.
                                                                                         	
  
                         hOps://gist.github.com               	
  
                                             	
  
 	
  	
   	
  	
   	
  	
   	
  	
   	
  	
  See	
  your	
  first	
  version	
  
                                                                              	
  
                                                in	
  the	
  UI
                                                              	
  
Clone	
  gist
                                                  	
  
$git clone https://gist.github.com/5027212.git!
Cloning into '5027212'...!
remote: Counting objects: 3, done.!
                           	
  
                           	
  
remote: Compressing objects: 100% (2/2), done.!
                            	
  

remote: Total 3 (delta 0), reused 0 (delta 0)!
Unpacking objects: 100% (3/3), done.!




$ cd 5027212/!
                                                                  	
  
$ ls!                                                             	
  
                                                                  	
  
crawler.py!                                                      	
  
                                                                 	
  
            NB:	
  Here	
  crawler.py	
  is	
  just	
  an	
  example,	
  you	
  will	
  have	
  a	
  different	
  filename	
  
                                                                 	
  
                                                                 	
  
  	
   	
   	
  	
   	
  	
   	
  	
   	
  Modify	
  and	
  Commit	
  	
  
                                             	
  	
  your	
  Gist	
  
                                                                 	
  
$ vi crawler.py !
$ git add crawler.py !
$ git commit -m "This is a gist test"!
•  [master 578d363] This is a gist test!
•   1 file changed, 2 insertions(+)!
$ git push!
Username for 'https://gist.github.com': runseb!
                                 	
  
Password for 'https://runseb@gist.github.com': !
                                 	
  
                                  	
  
Counting objects: 5, done.!
Delta compression using up to 4 threads.!
Compressing objects: 100% (2/2), done.!
Writing objects: 100% (3/3), 312 bytes, done.!
Total 3 (delta 1), reused 0 (delta 0)!
To https://gist.github.com/5027212.git!
   04d6d71..578d363 master -> master!
  	
   	
   	
  	
  Explana/ons
                                                  	
  
•  We	
  opened	
  the	
  file	
  and	
  made	
  some	
  changes	
  
•  We	
  made	
  sure	
  the	
  changes	
  were	
  being	
  
   tracked	
  (git	
  add).	
  
•  We	
  commi:ed	
  the	
  changes	
  to	
  our	
  local	
  
   repository	
  (git	
  commit).	
  
•  To	
  share	
  these	
  changes	
  with	
  others	
  we	
  
   pushed	
  them	
  to	
  the	
  remote	
  repository	
  (git	
  
   push).	
  
  	
  	
   	
  	
   	
  	
   	
  	
  See	
  the	
  revisions
                                                              	
  
 	
   	
  	
   	
  	
   	
  	
   	
  	
   	
  	
  Browsing	
  CloudStack
             	
                                                            	
  




                                                                  	
  
                                                                  	
  
                                                                  	
  
                                                                  	
  
                Explore	
  the	
  latest	
  commits,	
  view	
  the	
  diffs,	
  browse	
  the	
  various	
  branches   	
  
                 	
  hOps://git-­‐wip-­‐us.apache.org/repos/asf?p=incubator-­‐cloudstack.git                      	
  
                                                                  	
  
  	
  	
  	
   	
  	
   	
  	
   	
  	
   	
  	
   	
  	
   	
  Clone	
  CloudStack	
  
git clone https://git-wip-us.apache.org/repos/asf/
                          	
  
incubator-cloudstack.git! 	
  	
  



•  Which	
  branch	
  are	
  you	
  on	
  ?	
  

$ git branch!                                        	
  
* master!                                            	
  
                                                     	
  


	
  	
  	
  
 	
   	
  	
  	
   	
  	
   	
  	
   	
  	
  What	
  is	
  a	
  branch	
  ?	
  
•  A	
  branch	
  keeps	
  track	
  of	
  a	
  
   history	
  of	
  code	
  changes.	
  
•  Mul/ple	
  branches	
  keep	
  
   track	
  of	
  diverging	
  histories	
  
   of	
  code	
  changes.	
  
•  You	
  can	
  switch	
  between	
  
   branches	
  to	
  work	
  on	
  code	
  
   changes	
  without	
  impac/ng	
  
   another	
  branch	
  
•  You	
  can	
  merge	
  branches	
  to	
  
   unify	
  histories	
                               	
  
                                                      	
  
                                                      	
  
                                    hOp://git-­‐scm.com/book/ch3-­‐1.html
                                                                        	
  
                                                      	
  
                                                      	
  
 	
   	
  	
  	
   	
  	
   	
  	
   	
  	
  Iden/fy	
  an	
  ACS	
  branch	
  
$ git remote show origin!
* remote origin!
  Fetch URL: https://git-wip-us.apache.org/repos/
asf/incubator-cloudstack.git!
  Push URL: https://git-wip-us.apache.org/repos/
asf/incubator-cloudstack.git!
                          	
  
                          	
  
                           	
  
  HEAD branch: master!
  Remote branches:!
    4.0                                      tracked!
    4.1                                      tracked!
!
<snip>!
  	
  	
  	
   	
  	
   	
  	
   	
  Branching	
  
•  Releases	
  are	
  kept	
  in	
  their	
  own	
  branch	
  (e.g	
  4.0,	
  
   4.1)	
  
•  Features	
  are	
  being	
  developed	
  on	
  their	
  own	
  
   branch	
  (e.g	
  ipv6,	
  events-­‐framework)	
  
•  Default	
  branch	
  is	
  master	
  
•  You	
  can	
  checkout	
  a	
  remote	
  branch	
  
•  You	
  can	
  create	
  a	
  local	
  branch	
  
  	
   	
   	
  	
   	
  	
   	
  	
  Checkout	
  4.0	
  
$ git checkout 4.0!
Branch 4.0 set up to track remote branch 4.0 from
origin.!
                         	
  
Switched to a new branch ’4.0’!
                         	
  
                          	
  
$ git branch!
* 4.0!
  master!
!

•  You	
  now	
  have	
  a	
  4.0	
  local	
  branch	
  which	
  tracks	
  
   the	
  4.0	
  remote	
  branch.	
  	
  
•  Changes	
  in	
  your	
  local	
  branch	
  is	
  not	
  
   propagated	
  to	
  the	
  remote	
  un/l	
  you	
  push. 	
  
 	
   	
  	
   	
  	
   	
  	
   	
  Syncing	
  with	
  Others
           	
                                                          	
  
•  Other	
  developers	
  will	
  push	
  changes	
  to	
  the	
  
   remote	
  repository.	
  
•  To	
  make	
  sure	
  you	
  stay	
  in-­‐sync	
  with	
  the	
  
   remote	
  you	
  need	
  to	
  pull	
  changes	
  to	
  your	
  local	
  
   branch	
  
•  A	
  pull	
  will	
  try	
  to	
  merge	
  changes	
  in	
  the	
  remote	
  
   with	
  your	
  local	
  branch.	
  It	
  may	
  result	
  in	
  
   conflicts.!
                             $ git	
   pull
                                          !
                                  	
  
                         Already up-to-date.
                                   	
       !
Branching	
  
•  Get	
  familiar	
  with	
  branching	
  on	
  your	
  local	
  
   repository	
  
•  Create	
  branches,	
  switch	
  between	
  them	
  and	
  
   delete	
  them	
  

$   git   checkout –b foobar!
$   git   branch!             	
  
                              	
  
$   git   checkout master!     	
  

$   git   branch!
                                             	
  
$   git   branch –D foobar!                  	
  
                                             	
  
                           hOp://git-­‐scm.com/book/ch3-­‐1.html
                                                               	
  
                                             	
  
                                             	
  
 	
   	
  	
   	
  	
   	
  Configure	
  git
                            	
                              	
  
vi ~/.gitconfig!
                         	
  
git config –global user.name “your name”!
                         	
  
                          	
  
git config –global user.email you@email.com!
!
!

•  There	
  are	
  a	
  lot	
  more	
  configura/on	
  possible	
  


                                                  	
  
                                                  	
  
                                                  	
  
                                                  	
  
                hOp://incubator.apache.org/cloudstack/develop/non-­‐contributors.html     	
  
                        hOp://git-­‐scm.com/book/en/Git-­‐Basics-­‐Tips-­‐and-­‐Tricks
                                                                                     	
  
                                                  	
  
                                                  	
  
  	
  	
   	
  	
   	
  	
   	
  	
   	
  Your	
  first	
  ACS	
  Patch	
  
•  AMer	
  cloning	
  the	
  ACS	
  repository	
  
•  Create	
  a	
  local	
  branch	
  (e.g	
  mybranch)	
  
•  Edit	
  the	
  files	
  you	
  want	
  to	
  modify.	
  (e.g	
  Add	
  
   some	
  documenta/on,	
  fix	
  a	
  bug	
  from	
  JIRA)	
  
•  Stage	
  your	
  changes	
  and	
  check	
  that	
  you	
  did	
  not	
  
   forget	
  any	
  files.	
  
•  Commit	
  to	
  the	
  local	
  branch.	
  
•  Create	
  a	
  patch.	
                         	
  
                                                   	
  
                                                   	
  
                           hOps://issues.apache.org/jira/browse/CLOUDSTACK   	
  
                  hOp://incubator.apache.org/cloudstack/develop/non-­‐contributors.html	
  
                                                                                       	
  
                                                   	
  
                                                   	
  
 	
   	
  	
   	
  	
   	
  	
   	
  	
  First	
  Patch
                             	
                                           	
  
                                            	
  
$ git checkout –b mybranch!
                         	
  
                          	
  
!

•  Make	
  the	
  changes	
  you	
  want	
  
	
  
$ git add <file you changed>!
$ git status –s!
                         	
  
$ git commit –m “Comment your changes”!
                         	
  
                          	
  

$ git format-patch master –stdout > ~/
myfirstpatch.patch!
!
!

•  Look	
  at	
  the	
  content	
  of	
  the	
  patch	
  
 	
  	
   	
  	
   	
  	
   	
  	
   	
  Verify	
  the	
  Patch	
  
•  It	
  is	
  a	
  good	
  idea	
  to	
  check	
  that	
  your	
  patch	
  can	
  
   be	
  applied	
  cleanly	
  
•  Create	
  a	
  new	
  branch	
  star/ng	
  from	
  master,	
  
   apply	
  your	
  patch,	
  if	
  successful	
  submit	
  to	
  
   review	
  board	
  

$   git   checkout master!
$   git   checkout –b testbranch!
                             	
  
                             	
  
$   git   apply --check ~/myfirstpatch.patch!
                              	
  


$   git   apply ~/myfirstpatch.patch!
 	
   	
  	
   	
  	
   	
  	
   	
  	
  Submit	
  patch	
  
•  If	
  you	
  don’t	
  have	
  write	
  access	
  to	
  the	
  remote	
  
   repository,	
  you	
  need	
  a	
  mechanism	
  to	
  send	
  
   your	
  patch	
  upstream.	
  
•  In	
  ACS	
  we	
  use	
  Review	
  Board.	
  Create	
  an	
  
   account	
  and	
  enter	
  a	
  review	
  request.	
  



                                                   	
  
                                                   	
  
                  hOp://incubator.apache.org/cloudstack/develop/non-­‐contributors.html
                                                                                      	
  
                                hOps://reviews.apache.org/dashboard/	
  
                                                                       	
  
                                                   	
  
                                                   	
  
 	
   	
  	
  Conclusions	
  
•  Learn	
  and	
  Use	
  version	
  control	
  
•  Simple	
  cases	
  are	
  well…simple	
  J	
  
•  Git	
  is	
  used	
  heavily,	
  create	
  a	
  personal	
  github	
  
   account	
  
•  Apache	
  CloudStack	
  uses	
  Git	
  
•  Prepare	
  patches	
  and	
  send	
  them	
  to	
  us	
  
•  Become	
  an	
  Apache	
  Commi:er	
  

Contenu connexe

Tendances

DockerDay 2015: From months to minutes - How GE appliances brought docker int...
DockerDay 2015: From months to minutes - How GE appliances brought docker int...DockerDay 2015: From months to minutes - How GE appliances brought docker int...
DockerDay 2015: From months to minutes - How GE appliances brought docker int...Docker-Hanoi
 
Spring Boot on Kubernetes/OpenShift
Spring Boot on Kubernetes/OpenShiftSpring Boot on Kubernetes/OpenShift
Spring Boot on Kubernetes/OpenShiftKamesh Sampath
 
Content-Centric Web Development with Apache Sling
Content-Centric Web Development with Apache SlingContent-Centric Web Development with Apache Sling
Content-Centric Web Development with Apache SlingKoen Van Eeghem
 
Giles sirett welcome and cloud stack news
Giles sirett   welcome and cloud stack newsGiles sirett   welcome and cloud stack news
Giles sirett welcome and cloud stack newsShapeBlue
 
Apache Bigtop: a crash course in deploying a Hadoop bigdata management platform
Apache Bigtop: a crash course in deploying a Hadoop bigdata management platformApache Bigtop: a crash course in deploying a Hadoop bigdata management platform
Apache Bigtop: a crash course in deploying a Hadoop bigdata management platformrhatr
 
India Serverless Summit 2017 - Sponsorship Deck
India Serverless Summit 2017 - Sponsorship DeckIndia Serverless Summit 2017 - Sponsorship Deck
India Serverless Summit 2017 - Sponsorship DeckCodeOps Technologies LLP
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaRichard Gee
 
Migrating NYSenate.gov
Migrating NYSenate.govMigrating NYSenate.gov
Migrating NYSenate.govPantheon
 
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASY
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASYKUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASY
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASYRed Hat Developers
 
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCampHow to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCampJesus Manuel Olivas
 
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETESKUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETESAlex Soto
 
Quick Start: ActiveScaffold
Quick Start: ActiveScaffoldQuick Start: ActiveScaffold
Quick Start: ActiveScaffoldDavid Keener
 
Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8Christian Posta
 
A Tour of Ruby On Rails
A Tour of Ruby On RailsA Tour of Ruby On Rails
A Tour of Ruby On RailsDavid Keener
 
High Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootHigh Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootDaniel Woods
 
Transitioning from SVN to GIT
Transitioning from SVN to GITTransitioning from SVN to GIT
Transitioning from SVN to GITAcquia
 
How to contribute to cloud native computing foundation (CNCF)
How to contribute to cloud native computing foundation (CNCF)How to contribute to cloud native computing foundation (CNCF)
How to contribute to cloud native computing foundation (CNCF)Krishna-Kumar
 
KubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the UnionKubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the UnionKubeAcademy
 

Tendances (20)

DockerDay 2015: From months to minutes - How GE appliances brought docker int...
DockerDay 2015: From months to minutes - How GE appliances brought docker int...DockerDay 2015: From months to minutes - How GE appliances brought docker int...
DockerDay 2015: From months to minutes - How GE appliances brought docker int...
 
Spring Boot on Kubernetes/OpenShift
Spring Boot on Kubernetes/OpenShiftSpring Boot on Kubernetes/OpenShift
Spring Boot on Kubernetes/OpenShift
 
Content-Centric Web Development with Apache Sling
Content-Centric Web Development with Apache SlingContent-Centric Web Development with Apache Sling
Content-Centric Web Development with Apache Sling
 
Giles sirett welcome and cloud stack news
Giles sirett   welcome and cloud stack newsGiles sirett   welcome and cloud stack news
Giles sirett welcome and cloud stack news
 
Apache Bigtop: a crash course in deploying a Hadoop bigdata management platform
Apache Bigtop: a crash course in deploying a Hadoop bigdata management platformApache Bigtop: a crash course in deploying a Hadoop bigdata management platform
Apache Bigtop: a crash course in deploying a Hadoop bigdata management platform
 
India Serverless Summit 2017 - Sponsorship Deck
India Serverless Summit 2017 - Sponsorship DeckIndia Serverless Summit 2017 - Sponsorship Deck
India Serverless Summit 2017 - Sponsorship Deck
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with Kafka
 
Migrating NYSenate.gov
Migrating NYSenate.govMigrating NYSenate.gov
Migrating NYSenate.gov
 
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASY
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASYKUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASY
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES HAS NEVER BEEN SO EASY
 
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCampHow to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
 
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETESKUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
 
Quick Start: ActiveScaffold
Quick Start: ActiveScaffoldQuick Start: ActiveScaffold
Quick Start: ActiveScaffold
 
Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8Microservices, DevOps, and Containers with OpenShift and Fabric8
Microservices, DevOps, and Containers with OpenShift and Fabric8
 
A Tour of Ruby On Rails
A Tour of Ruby On RailsA Tour of Ruby On Rails
A Tour of Ruby On Rails
 
jclouds workshop
jclouds workshopjclouds workshop
jclouds workshop
 
High Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootHigh Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring Boot
 
Transitioning from SVN to GIT
Transitioning from SVN to GITTransitioning from SVN to GIT
Transitioning from SVN to GIT
 
How to contribute to cloud native computing foundation (CNCF)
How to contribute to cloud native computing foundation (CNCF)How to contribute to cloud native computing foundation (CNCF)
How to contribute to cloud native computing foundation (CNCF)
 
Java 8
Java 8Java 8
Java 8
 
KubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the UnionKubeCon EU 2016 Keynote: Kubernetes State of the Union
KubeCon EU 2016 Keynote: Kubernetes State of the Union
 

En vedette

Cloud Automation with ProActive
Cloud Automation with ProActiveCloud Automation with ProActive
Cloud Automation with ProActiveBrian AMEDRO
 
UShareSoft Image Management for CloudStack
UShareSoft Image Management for CloudStackUShareSoft Image Management for CloudStack
UShareSoft Image Management for CloudStackbuildacloud
 
BtrCloud CloudStack Plugin
BtrCloud CloudStack PluginBtrCloud CloudStack Plugin
BtrCloud CloudStack Pluginbuildacloud
 
Apalia/Amysta Cloud Usage Metering and Billing
Apalia/Amysta Cloud Usage Metering and BillingApalia/Amysta Cloud Usage Metering and Billing
Apalia/Amysta Cloud Usage Metering and Billingbuildacloud
 
Network Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient networkNetwork Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient networkCloudflare
 
Vivienda romana
Vivienda romana Vivienda romana
Vivienda romana mfierro1
 
INRIA continuous integration plaftorm
INRIA continuous integration plaftormINRIA continuous integration plaftorm
INRIA continuous integration plaftormbuildacloud
 

En vedette (10)

CloudStack and BigData
CloudStack and BigDataCloudStack and BigData
CloudStack and BigData
 
DevCloud and CloudMonkey
DevCloud and CloudMonkeyDevCloud and CloudMonkey
DevCloud and CloudMonkey
 
Build a Cloud Day Paris
Build a Cloud Day ParisBuild a Cloud Day Paris
Build a Cloud Day Paris
 
Cloud Automation with ProActive
Cloud Automation with ProActiveCloud Automation with ProActive
Cloud Automation with ProActive
 
UShareSoft Image Management for CloudStack
UShareSoft Image Management for CloudStackUShareSoft Image Management for CloudStack
UShareSoft Image Management for CloudStack
 
BtrCloud CloudStack Plugin
BtrCloud CloudStack PluginBtrCloud CloudStack Plugin
BtrCloud CloudStack Plugin
 
Apalia/Amysta Cloud Usage Metering and Billing
Apalia/Amysta Cloud Usage Metering and BillingApalia/Amysta Cloud Usage Metering and Billing
Apalia/Amysta Cloud Usage Metering and Billing
 
Network Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient networkNetwork Automation with Salt and NAPALM: a self-resilient network
Network Automation with Salt and NAPALM: a self-resilient network
 
Vivienda romana
Vivienda romana Vivienda romana
Vivienda romana
 
INRIA continuous integration plaftorm
INRIA continuous integration plaftormINRIA continuous integration plaftorm
INRIA continuous integration plaftorm
 

Similaire à Git 101 for CloudStack

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 GITPouriaQashqai1
 
Source control management
Source control managementSource control management
Source control managementOwen Winkler
 
Untangling fall2017 week2_try2
Untangling fall2017 week2_try2Untangling fall2017 week2_try2
Untangling fall2017 week2_try2Derek Jacoby
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2Derek Jacoby
 
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 GitGeoff Hoffman
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIsTim Osborn
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15Chen-Han Hsiao
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversionMangesh Bhujbal
 
Gitting the Most From Git
Gitting the Most From GitGitting the Most From Git
Gitting the Most From GitChris Miller
 
SouthEast LinuxFest 2015 - intro to git
SouthEast LinuxFest 2015 -  intro to gitSouthEast LinuxFest 2015 -  intro to git
SouthEast LinuxFest 2015 - intro to gitedgester
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlGiuseppe Masetti
 

Similaire à Git 101 for CloudStack (20)

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
 
Source control management
Source control managementSource control management
Source control management
 
Untangling fall2017 week2_try2
Untangling fall2017 week2_try2Untangling fall2017 week2_try2
Untangling fall2017 week2_try2
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2
 
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
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Git slide
Git slideGit slide
Git slide
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
 
Gitting the Most From Git
Gitting the Most From GitGitting the Most From Git
Gitting the Most From Git
 
Git hub
Git hubGit hub
Git hub
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
 
SouthEast LinuxFest 2015 - intro to git
SouthEast LinuxFest 2015 -  intro to gitSouthEast LinuxFest 2015 -  intro to git
SouthEast LinuxFest 2015 - intro to git
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version Control
 
Version control
Version controlVersion control
Version control
 
Github basics
Github basicsGithub basics
Github basics
 

Plus de Sebastien Goasguen

Kubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: KubelessKubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: KubelessSebastien Goasguen
 
On Docker and its use for LHC at CERN
On Docker and its use for LHC at CERNOn Docker and its use for LHC at CERN
On Docker and its use for LHC at CERNSebastien Goasguen
 
CloudStack Conference Public Clouds Use Cases
CloudStack Conference Public Clouds Use CasesCloudStack Conference Public Clouds Use Cases
CloudStack Conference Public Clouds Use CasesSebastien Goasguen
 
Kubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSKubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSSebastien Goasguen
 
Moving from Publican to Read The Docs
Moving from Publican to Read The DocsMoving from Publican to Read The Docs
Moving from Publican to Read The DocsSebastien Goasguen
 
SDN: Network Agility in the Cloud
SDN: Network Agility in the CloudSDN: Network Agility in the Cloud
SDN: Network Agility in the CloudSebastien Goasguen
 
CloudStack / Saltstack lightning talk at DevOps Amsterdam
CloudStack / Saltstack lightning talk at DevOps AmsterdamCloudStack / Saltstack lightning talk at DevOps Amsterdam
CloudStack / Saltstack lightning talk at DevOps AmsterdamSebastien Goasguen
 
Intro to CloudStack Build a Cloud Day
Intro to CloudStack Build a Cloud DayIntro to CloudStack Build a Cloud Day
Intro to CloudStack Build a Cloud DaySebastien Goasguen
 
CloudStack for Java User Group
CloudStack for Java User GroupCloudStack for Java User Group
CloudStack for Java User GroupSebastien Goasguen
 
Cloud Standards and CloudStack
Cloud Standards and CloudStackCloud Standards and CloudStack
Cloud Standards and CloudStackSebastien Goasguen
 

Plus de Sebastien Goasguen (20)

Kubernetes Sealed secrets
Kubernetes Sealed secretsKubernetes Sealed secrets
Kubernetes Sealed secrets
 
Kubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: KubelessKubernetes Native Serverless solution: Kubeless
Kubernetes Native Serverless solution: Kubeless
 
Serverless on Kubernetes
Serverless on KubernetesServerless on Kubernetes
Serverless on Kubernetes
 
Kubernetes kubecon-roundup
Kubernetes kubecon-roundupKubernetes kubecon-roundup
Kubernetes kubecon-roundup
 
Docker and CloudStack
Docker and CloudStackDocker and CloudStack
Docker and CloudStack
 
On Docker and its use for LHC at CERN
On Docker and its use for LHC at CERNOn Docker and its use for LHC at CERN
On Docker and its use for LHC at CERN
 
CloudStack Conference Public Clouds Use Cases
CloudStack Conference Public Clouds Use CasesCloudStack Conference Public Clouds Use Cases
CloudStack Conference Public Clouds Use Cases
 
Kubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSKubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOS
 
Apache Libcloud
Apache LibcloudApache Libcloud
Apache Libcloud
 
Moving from Publican to Read The Docs
Moving from Publican to Read The DocsMoving from Publican to Read The Docs
Moving from Publican to Read The Docs
 
Cloud and Big Data trends
Cloud and Big Data trendsCloud and Big Data trends
Cloud and Big Data trends
 
SDN: Network Agility in the Cloud
SDN: Network Agility in the CloudSDN: Network Agility in the Cloud
SDN: Network Agility in the Cloud
 
CloudStack / Saltstack lightning talk at DevOps Amsterdam
CloudStack / Saltstack lightning talk at DevOps AmsterdamCloudStack / Saltstack lightning talk at DevOps Amsterdam
CloudStack / Saltstack lightning talk at DevOps Amsterdam
 
CloudStack Clients and Tools
CloudStack Clients and ToolsCloudStack Clients and Tools
CloudStack Clients and Tools
 
Intro to CloudStack Build a Cloud Day
Intro to CloudStack Build a Cloud DayIntro to CloudStack Build a Cloud Day
Intro to CloudStack Build a Cloud Day
 
Apache CloudStack AlpesJUG
Apache CloudStack AlpesJUGApache CloudStack AlpesJUG
Apache CloudStack AlpesJUG
 
Building FOSS clouds
Building FOSS cloudsBuilding FOSS clouds
Building FOSS clouds
 
CloudStack for Java User Group
CloudStack for Java User GroupCloudStack for Java User Group
CloudStack for Java User Group
 
Avoiding cloud lock-in
Avoiding cloud lock-inAvoiding cloud lock-in
Avoiding cloud lock-in
 
Cloud Standards and CloudStack
Cloud Standards and CloudStackCloud Standards and CloudStack
Cloud Standards and CloudStack
 

Dernier

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Dernier (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

Git 101 for CloudStack

  • 1. Using  Git  101   Sebas/en  Goasguen     @sebgoa    
  • 2. Outline   •  Intro  to  version  control  and  Git   •  Crea/ng  your  first  git  repo  using  Gist   •  Cloning  the  CloudStack  repo   •  Managing  branches   •  Making  your  first  commit   •  Applying  a  patch     NB:  Check  the  footnotes  for  addi/onal  informa/on      
  • 3.                      Version  Control   •  Revision  control  (a.k.a  version  control)  is  the   management  of  modifica/ons  of  digital   informa/on.   •  In  the  context  of  soMware  engineering  it   represents  the  management  of  the  mul-ple   versions  of  a  so3ware  as  it  evolves.   •  In  other  terms  it  tracks  changes  in  the  source   code.   hOp://en.wikipedia.org/wiki/Revision_control      
  • 4.                    Version  Control  Systems   •  Historically:   –  Centralized  systems  used   –  Concurrent  Version  System  (CVS)   –  Subversion  (SVN)   •  Currently:   –  Distributed  version  control     –  Git  (2005)   –  Mercurial/hg   hOp://cvs.nongnu.org   hOp://subversion.apache.org   hOp://git-­‐scm.com   hOp://mercurial.selenic.com    
  • 5. Workflow   •  Developers  clone  a   central  repository   •  Local  repository  is  a   working  copy   •  Updates  are  made   locally  (fast)   •  When  done,  changes   are  pushed  back  to   master       •  Developers  could  push/ hOp://i.stack.imgur.com/9IW5z.png     pull  to  each  other      
  • 6.    Ge]ng  Git   •  Apache  CloudStack  (ACS)  uses  Git  as   distributed  version  control  system   •  Install  git  on  your  machine.  Depending  on   your  OS  and  package  manager:   ! !#yum install git-core! ! !#apt-get install git!       ! !#port install git-core!
  • 7.                Tour  GitHub   •  Check  the  publicly   accessible  repositories   •  Create  an  account   Exercise:   •  Check  Gist   •  Put  a  document  under   revision  control         hOps://github.com/repositories   hOps://gist.github.com    
  • 8.    Create  a  Gist       Copy/Paste  code  or  text  in  the  main  window,  add  a  decrip/on.   hOps://gist.github.com    
  • 9.                      See  your  first  version     in  the  UI  
  • 10. Clone  gist   $git clone https://gist.github.com/5027212.git! Cloning into '5027212'...! remote: Counting objects: 3, done.!     remote: Compressing objects: 100% (2/2), done.!   remote: Total 3 (delta 0), reused 0 (delta 0)! Unpacking objects: 100% (3/3), done.! $ cd 5027212/!   $ ls!     crawler.py!     NB:  Here  crawler.py  is  just  an  example,  you  will  have  a  different  filename      
  • 11.                    Modify  and  Commit        your  Gist     $ vi crawler.py ! $ git add crawler.py ! $ git commit -m "This is a gist test"! •  [master 578d363] This is a gist test! •  1 file changed, 2 insertions(+)! $ git push! Username for 'https://gist.github.com': runseb!   Password for 'https://runseb@gist.github.com': !     Counting objects: 5, done.! Delta compression using up to 4 threads.! Compressing objects: 100% (2/2), done.! Writing objects: 100% (3/3), 312 bytes, done.! Total 3 (delta 1), reused 0 (delta 0)! To https://gist.github.com/5027212.git! 04d6d71..578d363 master -> master!
  • 12.          Explana/ons   •  We  opened  the  file  and  made  some  changes   •  We  made  sure  the  changes  were  being   tracked  (git  add).   •  We  commi:ed  the  changes  to  our  local   repository  (git  commit).   •  To  share  these  changes  with  others  we   pushed  them  to  the  remote  repository  (git   push).  
  • 13.                  See  the  revisions  
  • 14.                        Browsing  CloudStack             Explore  the  latest  commits,  view  the  diffs,  browse  the  various  branches    hOps://git-­‐wip-­‐us.apache.org/repos/asf?p=incubator-­‐cloudstack.git    
  • 15.                              Clone  CloudStack   git clone https://git-wip-us.apache.org/repos/asf/   incubator-cloudstack.git!     •  Which  branch  are  you  on  ?   $ git branch!   * master!          
  • 16.                      What  is  a  branch  ?   •  A  branch  keeps  track  of  a   history  of  code  changes.   •  Mul/ple  branches  keep   track  of  diverging  histories   of  code  changes.   •  You  can  switch  between   branches  to  work  on  code   changes  without  impac/ng   another  branch   •  You  can  merge  branches  to   unify  histories         hOp://git-­‐scm.com/book/ch3-­‐1.html      
  • 17.                      Iden/fy  an  ACS  branch   $ git remote show origin! * remote origin! Fetch URL: https://git-wip-us.apache.org/repos/ asf/incubator-cloudstack.git! Push URL: https://git-wip-us.apache.org/repos/ asf/incubator-cloudstack.git!       HEAD branch: master! Remote branches:! 4.0 tracked! 4.1 tracked! ! <snip>!
  • 18.                  Branching   •  Releases  are  kept  in  their  own  branch  (e.g  4.0,   4.1)   •  Features  are  being  developed  on  their  own   branch  (e.g  ipv6,  events-­‐framework)   •  Default  branch  is  master   •  You  can  checkout  a  remote  branch   •  You  can  create  a  local  branch  
  • 19.                  Checkout  4.0   $ git checkout 4.0! Branch 4.0 set up to track remote branch 4.0 from origin.!   Switched to a new branch ’4.0’!     $ git branch! * 4.0! master! ! •  You  now  have  a  4.0  local  branch  which  tracks   the  4.0  remote  branch.     •  Changes  in  your  local  branch  is  not   propagated  to  the  remote  un/l  you  push.  
  • 20.                  Syncing  with  Others     •  Other  developers  will  push  changes  to  the   remote  repository.   •  To  make  sure  you  stay  in-­‐sync  with  the   remote  you  need  to  pull  changes  to  your  local   branch   •  A  pull  will  try  to  merge  changes  in  the  remote   with  your  local  branch.  It  may  result  in   conflicts.! $ git   pull !   Already up-to-date.   !
  • 21. Branching   •  Get  familiar  with  branching  on  your  local   repository   •  Create  branches,  switch  between  them  and   delete  them   $ git checkout –b foobar! $ git branch!     $ git checkout master!   $ git branch!   $ git branch –D foobar!     hOp://git-­‐scm.com/book/ch3-­‐1.html      
  • 22.              Configure  git     vi ~/.gitconfig!   git config –global user.name “your name”!     git config –global user.email you@email.com! ! ! •  There  are  a  lot  more  configura/on  possible           hOp://incubator.apache.org/cloudstack/develop/non-­‐contributors.html   hOp://git-­‐scm.com/book/en/Git-­‐Basics-­‐Tips-­‐and-­‐Tricks      
  • 23.                    Your  first  ACS  Patch   •  AMer  cloning  the  ACS  repository   •  Create  a  local  branch  (e.g  mybranch)   •  Edit  the  files  you  want  to  modify.  (e.g  Add   some  documenta/on,  fix  a  bug  from  JIRA)   •  Stage  your  changes  and  check  that  you  did  not   forget  any  files.   •  Commit  to  the  local  branch.   •  Create  a  patch.         hOps://issues.apache.org/jira/browse/CLOUDSTACK   hOp://incubator.apache.org/cloudstack/develop/non-­‐contributors.html        
  • 24.                    First  Patch       $ git checkout –b mybranch!     ! •  Make  the  changes  you  want     $ git add <file you changed>! $ git status –s!   $ git commit –m “Comment your changes”!     $ git format-patch master –stdout > ~/ myfirstpatch.patch! ! ! •  Look  at  the  content  of  the  patch  
  • 25.                    Verify  the  Patch   •  It  is  a  good  idea  to  check  that  your  patch  can   be  applied  cleanly   •  Create  a  new  branch  star/ng  from  master,   apply  your  patch,  if  successful  submit  to   review  board   $ git checkout master! $ git checkout –b testbranch!     $ git apply --check ~/myfirstpatch.patch!   $ git apply ~/myfirstpatch.patch!
  • 26.                    Submit  patch   •  If  you  don’t  have  write  access  to  the  remote   repository,  you  need  a  mechanism  to  send   your  patch  upstream.   •  In  ACS  we  use  Review  Board.  Create  an   account  and  enter  a  review  request.       hOp://incubator.apache.org/cloudstack/develop/non-­‐contributors.html   hOps://reviews.apache.org/dashboard/        
  • 27.        Conclusions   •  Learn  and  Use  version  control   •  Simple  cases  are  well…simple  J   •  Git  is  used  heavily,  create  a  personal  github   account   •  Apache  CloudStack  uses  Git   •  Prepare  patches  and  send  them  to  us   •  Become  an  Apache  Commi:er