Top Banner
GIT, GITHUB Y MARKDOWN ADOLFO SANZ DE DIEGO DICIEMBRE 2015
101

Git, GitHub y Markdown

Jan 12, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Git, GitHub y Markdown

GIT,GITHUBYMARKDOWNADOLFOSANZDEDIEGO

DICIEMBRE2015

Page 2: Git, GitHub y Markdown

1ACERCADE

Page 3: Git, GitHub y Markdown

1.1AUTORAdolfoSanzDeDiegoBlog:Correo:GitHub:Twitter:LinkedIn:SlideShare:

[email protected]/asanzdiegotwitter.com/asanzdiegoin/asanzdiegoslideshare.net/asanzdiego

Page 4: Git, GitHub y Markdown

1.2LICENCIAEsteobraestábajounalicencia:CreativeCommonsReconocimiento-CompartirIgual3.0

Page 5: Git, GitHub y Markdown

1.3FUENTELasslidesysusfuenteslaspodéisencontraren:https://github.com/asanzdiego/curso-git-github-markdown-2015

Page 6: Git, GitHub y Markdown

2INTRODUCCIÓN

Page 7: Git, GitHub y Markdown

2.1OBJETIVOS1. ConocerlascaracterísticasdeGitysercapazdeinstalarloyconfigurarlo.

2. ConocerysercapazdeusarloscomandosdeGit.3. ConocerlascaracterísticasdeGitHubysercapazdecrearunacuentayconfigurarla.

4. SercapazdecrearyclonarrepositoriosenGitHub.

5. ConocerysercapazdeusarlasprincipalescaracterísticasdeGitHub.

6. ConocerlasintaxisdellenguajeMarkdown.

Page 8: Git, GitHub y Markdown

2.2INDICEBloque1UsobásicodeGityGitHub

Bloque2UsoavanzadodeGityGitHub

Bloque3Markdown

Page 9: Git, GitHub y Markdown

2.3ENLACESIMPRESCINDIBLESProGIT(sobretodotemas1,2,3y6):

PáginaoficialdeGit:

PáginaoficialdeGitHub:

ChuletadelasintaxisdeMarkdown:

https://git-scm.com/book/es/v2

https://git-scm.com/

https://github.com/

http://warpedvisions.org/projects/markdown-cheat-sheet

Page 10: Git, GitHub y Markdown

2.4OTROSENLACESDEINTERÉSAprenderGIT...ydecaminoGitHub:

MinitutorialdeGIT:

TutorialdeGITdecodecademy;

HowGitHubUsesGitHubtoBuildGitHub:

MarkdownSlides:

https://github.com/oslugr/curso-git

https://try.github.io/

https://www.codecademy.com/learn/learn-git

http://zachholman.com/talk/how-github-uses-github-to-build-github/

https://github.com/asanzdiego/markdownslides

Page 11: Git, GitHub y Markdown

3USOBÁSICODEGIT

Page 12: Git, GitHub y Markdown

3.1SISTEMACONTROLDEVERSIONES"Sistemaqueregistraloscambios

realizadossobreunarchivooconjuntodearchivosalolargodel

tiempo,demodoquepuedasrecuperarversionesespecíficasmás

adelante."

https://git-scm.com/book/es/v2/Empezando-Acerca-del-control-de-versiones

Page 13: Git, GitHub y Markdown

3.2VCSLOCALESLomássimple:hacercopiasdedirectorios.AparecieronBDenlocalqueguardanelregistrodeloscambiosrealizadosalosarchivos.

Page 14: Git, GitHub y Markdown

3.3VCSCENTRALIZADOSUnservidorcentralqueguardaloscambios.

VCSCentralizado

Page 15: Git, GitHub y Markdown

3.4PROSYCONTRASVCSCENTRALIZADOSPros:máscolaborativoqueellocal.Contras:dependesdeunservidorcentral.

Page 16: Git, GitHub y Markdown

3.5VCSDISTRIBUIDOSCadaclientenosolodescargalaúltimacopia,sinotodoelrepositorio.

VCSDistribuido

Page 17: Git, GitHub y Markdown

3.6VENTAJESVCSDISTRIBUIDOSPuedesseguirtrabajandoaunqueelrepositorioremotoestécaido.másautonomía

Lainformaciónestámásreplicada.menosvulnerable

Permitepruebasenlocalysubirsololorelevante.máslimpieza

Page 18: Git, GitHub y Markdown

3.7CARACTERÍSTICASDEGITCreadoporLinuxTorvalds,líderdelequipodelkernelLinux.Objetivoscuandosecreó:RápidoSencilloMultiramaDistribuidoGrandesproyectos

Page 19: Git, GitHub y Markdown

3.8INSTALACIÓNWindows:Mac:Linux:

https://git-scm.com/download/winhttps://git-scm.com/download/machttps://git-scm.com/download/linux

Page 20: Git, GitHub y Markdown

3.9CONFIGURACIÓNINICIALgitconfig--globaluser.name"Nombrequequierasmostrar"

gitconfig--globaluser.email"[email protected]"

Page 21: Git, GitHub y Markdown

3.10GUIShttps://git-scm.com/downloads/guis

Page 22: Git, GitHub y Markdown

3.11IINICIALIZARUNREPOSIORIOCreaelsubdirectorio.gitconarchivosdegitparagestionarelrepositorio.gitinit

Page 23: Git, GitHub y Markdown

3.12ELÁREADESTAGING

StagingArea

Page 24: Git, GitHub y Markdown

3.13VERELESTADODELOSARCHIVOSImportantesaberelestadodelosarchivos.

gitstatus

Page 25: Git, GitHub y Markdown

3.14VERLASDIFERENCIASPodemosverlasdiferenciasentreeláreadestagingyeláreadetrabajo.gitdiff

Page 26: Git, GitHub y Markdown

3.15AÑADIRARCHIVOSPodemosañadirloscambiosdeunfichero(ovarios)aláreadestaging(desdeeláreadetrabajo).gitaddnombre-del-fichero

gitadd*.extension

Page 27: Git, GitHub y Markdown

3.16BORRARARCHIVOSPodemosborrararchivosdeláreadestaging(tambiénloborrarádeláreadetrabajo)gitrmnombre-del-fichero

Page 28: Git, GitHub y Markdown

3.17MOVER/RENOMBRARARCHIVOSPodemosmover/renombrararchivoseneláreadestaging(tambiénloharáeneláreadetrabajo)gitmvantiguo-nombre-del-ficheronuevo-nombre-del-fichero

Page 29: Git, GitHub y Markdown

3.18RESETARARCHIVOSPararesetearloscambiosdeunfichero(ovarios)alareadetrabajo(desdeelareadestaging).gitresetnombre-del-fichero

Page 30: Git, GitHub y Markdown

3.19GRABARLOSCAMBIOSParagrabarloscambiosrealizadosalrepositorio(desdeeláreadestaging).gitcommit-m"mensajecortodescriptivoconloscambios"

Page 31: Git, GitHub y Markdown

3.20DESHACERLOSCAMBIOSParadeshacerloscambiosdeunfichero(ovarios)alareadestaging(desdeelrepositorio).gitcheckoutnombre-del-fichero

Page 32: Git, GitHub y Markdown

3.21LISTADODECAMBIOSParaverellistadodecambiosrealizadosenelrepositorio.gitlog

Page 33: Git, GitHub y Markdown

3.22ALIASPodemoscrearalias.

gitconfig--globalalias.list'log--oneline--decorate--graph--all'

Page 34: Git, GitHub y Markdown

3.23IGNORARARCHIVOSPodemosignorararchivosañadiendolosalfichero.gitignore.

Page 35: Git, GitHub y Markdown

3.24CREANDOETIQUETASExistenetiquetasligeras,yetiquetasanotadas(igualesperoestasconmásinformación)gittagnombre-etiqueta-lijera

gittag-anombre-etiqueta-anotada-m"mensajequeacompañaalaetiqueta"

Page 36: Git, GitHub y Markdown

3.25ETIQUETASTARDÍASSepuedecrearunaetiquetaconociendoelhashdelcommit(verlocongitlog).gittag-anombre-etiqueta-anotada-m"mensajequeacompañaalaetiqueta"hash-del-commit

Page 37: Git, GitHub y Markdown

3.26VERUNAETIQUETAPodemosverinformaciónconcretadeunaetiqueta.gitshownombre-etiqueta

Page 38: Git, GitHub y Markdown

3.27SACARUNAETIQUETANopodemossacarunaetiqueta,peropodemoscolocarennuestrodirectoriodetrabajounaversiónquecoincidaconalgunaetiqueta,creandounaramanueva:gitcheckout-bnombre-ramanombre-etiqueta

Page 39: Git, GitHub y Markdown

4USOBÁSICODEGITHUB

Page 40: Git, GitHub y Markdown

4.1CARACTERÍSTICASDEGITHUBPlataformadedesarrollocolaborativo,queutilizaGit.Losrepositoriossonpúblicos,salvoconcuentadepago.Tienefacetasderedsocial(perfilpúblico,seguidores,estrellas,etc.)Nospermitegestionarorganizacionesyequipos.Gestióndeproyectos(wiki,releases,incidencias,gráficos,etc.)Servidorweb.

Page 41: Git, GitHub y Markdown

4.2CREARCUENTA

CrearcuentaenGitHub

Page 42: Git, GitHub y Markdown

4.3CREARREPOSITORIO

Crearunrepositorio

Page 43: Git, GitHub y Markdown

4.4CONFIGURARCLAVES(I)NospermitegestionarrepositoriosmedianteSSHsintenerqueestarponiendosiemprenuestraconstraseña.Segeneraunaclaveprivadaqueseguardeennuestroordenadoryunaclavepúblicaqueeslaquetenemosqueguardarennuestracuenta.

Page 44: Git, GitHub y Markdown

4.5CONFIGURARCLAVES(II)Lapodemosusarpuessoloconunordenador.Instrucciones:https://help.github.com/articles/generating-ssh-keys/

Page 45: Git, GitHub y Markdown

4.6CAMBIARAVATARViewprofileandmore>Settings>Profile

CambiaravatarenGitHub

Page 46: Git, GitHub y Markdown

4.7DOBLEFACTORDEAUTENTIFICACIÓNViewprofileandmore>Settings>Security

ActivreldoblefactordeautentificaciónenGitHub

Page 47: Git, GitHub y Markdown

4.8USOSOCIALCaracterísticassociales:Seguiragente.Seguirproyectos(watch).Premiarproyectos(start).Forquearproyectos(fork).Crearorganizaciones.

Page 48: Git, GitHub y Markdown

5USOAVANZADODEGIT

Page 49: Git, GitHub y Markdown

5.1CONECTARUNREPOSITORIOREMOTOPodemosconectarunoovariosreposioriosremotosanuestrorepositorio.gitremoteaddalias-repositorio-remotourl-repositorio-remoto

Page 50: Git, GitHub y Markdown

5.2RENOMBRARUNREPOSITORIOREMOTOPodemosrenombrarelaliasdeunreposiorioremoto.gitremoterenameantiguo-aliasnuevo-alias

Page 51: Git, GitHub y Markdown

5.3DESCONECTARUNREPOSITORIOREMOTOPodemosdesconectarunreposiorioremoto.

gitremoteremovealias-repositorio-remoto

Page 52: Git, GitHub y Markdown

5.4VERLOSREPOSITORIOSREMOTOSPodemosverlosrepositoriosremotosconectadosylospermisosquetenemos.gitremote-v

Page 53: Git, GitHub y Markdown

5.5DESCARGARCAMBIOSREMOTOSPodemosdescargarloscambiosremotossinmodificarnuestrorepositoriolocal.gitfetchalias-repositorio-remoto

Page 54: Git, GitHub y Markdown

5.6DESCARGARYCOMBINARPodemosdescargarycombinarloscambiosremotosconlosdeturepositoriolocal.gitpullalias-repositorio-remotonombre-rama-repositorio-remoto

Page 55: Git, GitHub y Markdown

5.7ENVIARDATOS(I)Podemosenviardatosalreposiorioremoto(solosiestáup-to-date).gitpushalias-repositorio-remotonombre-rama-repositorio-remoto

Page 56: Git, GitHub y Markdown

5.8ENVIARDATOS(II)Normalmente:

gitpushoriginmaster

Page 57: Git, GitHub y Markdown

5.9ENVIARDATOS(III)Siqueremossubirlostags:

gitpush--tagoriginmaster

Page 58: Git, GitHub y Markdown

5.10CLONARREPOSITORIOSClonarescomo:haceruninitluegounremoteaddluegounfetchconalias=origindejandolasramasremotaylocalenmaster

gitcloneurl-repositorio-remoto

Page 59: Git, GitHub y Markdown

5.11INSPECCIONARREPOSITORIOREMOTOPodemosverinformacióndeunremotoparticular,ycomoestánconfiguradospullypush.gitremoteshowalias-repositorio-remoto

Page 60: Git, GitHub y Markdown

5.12RESUMENÁREAS

ResumenáreasGIT

Page 61: Git, GitHub y Markdown

5.13CREARUNARAMAPodemoscrearramasquesonapuntadoresquepodemosmoverporlosdistintossnapshots.Sololacreamos,nonossituamosenella.

gitbranchnombre-rama

Page 62: Git, GitHub y Markdown

5.14CAMBIARDERAMAElHEADeselapuntadorqueusaGITparasaberenqueramaestás.CuandocambiamosderamaGITcambiaelHEADylosficherosdetuáreadetrabajo.

gitcheckoutnombre-rama

Page 63: Git, GitHub y Markdown

5.15CREARYCAMBIARDERAMAPodemoscrearycambiarderamaconunmismocomando.gitcheckout-bnombre-rama

Page 64: Git, GitHub y Markdown

5.16VERLASRAMASYELHEADPodemosverlasramasydondeapuntaelHEAD.gitlog--oneline--decorate--graph--all

gitbranch-v

Page 65: Git, GitHub y Markdown

5.17FUSIONARRAMASGITesmuypotenteconlafusiónderamas.

gitmergenombre-rama

Page 66: Git, GitHub y Markdown

5.18SOLUCIONARCONFLICTOSSialhacerunmergeexistanconflictosGITlosapuntaenlospropiosficheros.<<<<<<<HEAD:index.html<divid="footer">contact:[email protected]</div>=======<divid="footer">[email protected]</div>>>>>>>>issue:index.html

Page 67: Git, GitHub y Markdown

5.19BORRARRAMASUnavezfusionadolaramaenelmaster,convieneborrarla(solonosdejasiestáfusionada).gitbranch-dnombre-rama

Page 68: Git, GitHub y Markdown

5.20LISTADODERAMASPORESTADOPodemossaberqueramasestánfusionadaycualesno.gitbranch--merged

gitbranch--no-merged

Page 69: Git, GitHub y Markdown

5.21SINCRONIZARRAMAREMOTAIgualquesincronizamoslaramamasterremota,podemossincronizarotrasramasremotas.gitcheckout-bnombre-rama-localalias-repositorio-remoto/nombre-rama-remota

gitcheckout--trackalias-repositorio-remoto/nombre-rama-remota

Page 70: Git, GitHub y Markdown

5.22ASIGNARRAMAREMOTAPodemosasignareláreadetrabajoaunaramaremota.gitcheckout-ualias-repositorio-remoto/nombre-rama-remota

Page 71: Git, GitHub y Markdown

5.23LISTADODETODASLASRAMASPodemoslistarnosololasramaslocales,sinotambiénlasremotas.gitbranch-vv

Page 72: Git, GitHub y Markdown

5.24ELIMINARRAMAREMOTAPodemoseliminarlasramasremotas.

gitpushalias-repositorio-remoto--deletenombre-rama-remota

Page 73: Git, GitHub y Markdown

6USOAVANZADODEGITHUB

Page 74: Git, GitHub y Markdown

6.1AÑADIRCOLABORADORESPodemosdarpermisosdepushaquienqueramos.

GitHubNewCollaborator

Page 75: Git, GitHub y Markdown

6.2CREARORGANIZACIONESPodemoscrearorganizaciones.

GitHubNewOrganization

Page 76: Git, GitHub y Markdown

6.3GESTIONARORGANIZACIONESDentrodelasorganizacionespodemoscrearequiposy/otrabajarconcolaboradoresexternos.Elniveldepermisossegestionaaniveldeequipo.Laspersonastendránlospermisosdelosequiposalosquepertenezca.Lospermisosseotorganacadarepositorio.

Page 77: Git, GitHub y Markdown

6.4FORKEARPROYECTOSParaparticiparenunproyectosinpermisosdeescritura,puedesforkearlo.Consisteencrearunacopiacompletadelrepositoriobajotucontrol:seencontraráentucuentaypodrásescribirenélsinlimitaciones.

Page 78: Git, GitHub y Markdown

6.5PULL-REQUESTS(I)Paraenviarpropuestasdemejora.Seusamuchoparaproyectosquenosontuyosyendondetegustaríacolaborar.Tambiénseusadentrodeequiposparagestionarproyectosgrandes.

Page 79: Git, GitHub y Markdown

6.6PULL-REQUESTS(II)1. Crearunforkdeproyecto.2. Clonarnuestroforkennuestroequipo.3. Crearunaramaqueseadescriptiva.4. Realizarnuestroscambios.5. Comprobarloscambios.6. Enviarnuestranuevaramadevueltaanuestrofork.

Page 80: Git, GitHub y Markdown

6.7PULL-REQUESTS(III)1. AbrirunPullRequestenGitHub.2. Participaenladiscusiónasociada.3. Opcionalmente,serealizannuevoscommits.4. ElpropietariodelproyectooriginalcierraelPullRequestbienfusionandolaramacontuscambiosobienrechazándolos.

Page 81: Git, GitHub y Markdown

6.8ISSUESYWIKISTodoslosrepositoriosdeGitHubtienenasociados:ungestordeincidencias(issues)unawikiparadocumentar

Page 82: Git, GitHub y Markdown

6.9GITHUBPAGES(I)Podemostenerservidorwebenlosrepositoriossimplementenombrandolosasí:usuario.github.io

organizacion.github.io

Page 83: Git, GitHub y Markdown

6.10GITHUBPAGES(II)Tambiénpodemoshacerlomismoconundeterminadoproyectocreandounaramagh-pages.Ver:https://pages.github.com/

Page 84: Git, GitHub y Markdown

6.11FICHEROREADME.MDNoslomuestrarenderizadoenlapáginadelreposiorio.

Page 85: Git, GitHub y Markdown

6.12WEBHOOKS&SERVICESParaqueGitHubpuedainteractúarconsistemasexternos.Losserviciosestányamedioconfigurados.Sinecesitasalgomásespecificolotienesquehacerconwebhooks,queloquehaceGitHubeshacerunPOSTalaURLqueindiquescuandoselancealgúnevento(push,pullrequest,fork,etc.)

Page 86: Git, GitHub y Markdown

7MARKDOWN

Page 87: Git, GitHub y Markdown

7.1¿QUÉESMARKDOWN?"Esunlenguajedemarcadoligeroquetratadeconseguirlamáximalegibilidady'publicabilidad'usando

textoplano."

https://es.wikipedia.org/wiki/Markdown

Page 88: Git, GitHub y Markdown

7.2CARACTERÍSTICASPRINCIPALESTextoplanoSintaxissencillaLegibilidadPublicabilidadExportabiliad

Page 89: Git, GitHub y Markdown

7.3MARDOWNSLIDEShttps://github.com/asanzdiego/markdownslides

Page 90: Git, GitHub y Markdown

7.4CHULETADEMARKDOWN:http://warpedvisions.org/projects/markdown-cheat-sheet

Page 91: Git, GitHub y Markdown

7.5EDITORONLINEhttps://jbt.github.io/markdown-editor/

Page 92: Git, GitHub y Markdown

7.6ENCABEZADOS(I)<h1>,<h2>,<h3>

#Encabezadodeprimernivel

##Encabezadodesegundonivel

###Encabezadodetercernivel

Page 93: Git, GitHub y Markdown

7.7ENCABEZADOS(II)Equivalentealoanterior.

Encabezadodeprimernivel==========================

Encabezadodesegundonivel---------------------------

###Encabezadodetercernivel###

Page 94: Git, GitHub y Markdown

7.8LISTASNONUMERADASNoenumeradas:sepuedeusarelmenossepuedeusarelasterísicosepuedeusarelmás

-sepuedeusarelmenos*sepuedeusarelasterísico+sepuedeusarelmás

Page 95: Git, GitHub y Markdown

7.9LISTASNUMERADASEnumeradas:1. Primerelemento2. Segundoelemento3. Tercerelemento

1.Primerelemento1.Segundoelemento1.Tercerelemento

Page 96: Git, GitHub y Markdown

7.10FORMATO(NEGRITA,CURSIVA,TACHADO)Textoencursivaconunasteriscooconunguiónbajo.Textoennegritacondosasteriscosocondosguionesbajos.Textotachadocondosvirgulillas.-Textonegritacon**dosasteriscos**ocon__dosguionesbajos__.-Textocursivacon*unasterisco*ocon_unguiónbajo_.-Textotachadocon~~dosvirgulillas~~.

Page 97: Git, GitHub y Markdown

7.11TABLASHeader Header RightCell Cell $10Cell Cell $20

|Header|Header|Right||------|------|-----:||Cell|Cell|$10||Cell|Cell|$20|

Page 98: Git, GitHub y Markdown

7.12CITAS"NohaycaminohaciaelSoftware

Libre,elSoftwareLibreeselcamino"

>"NohaycaminohaciaelSoftwareLibre,elSoftwareLibreeselcamino"

Page 99: Git, GitHub y Markdown

7.13CÓDIGOrequire(maps)#activacióndelibreríarequire(mapproj)#seusaráparaprojection="polyconic"#Cargarlosdatos#unempincluyedatosparacondadosdelosEstadosUnidoscontinentales.data(unemp)#Datosdedesempleodata(county.fips)#mapadeloscondados

require(maps)#activacióndelibreríarequire(mapproj)#seusaráparaprojection="polyconic"#Cargarlosdatos#unempincluyedatosparacondadosdelosEstadosUnidoscontinentales.data(unemp)#Datosdedesempleodata(county.fips)#mapadeloscondados

Page 100: Git, GitHub y Markdown

7.14ENLACES

Enlacesencillo:-

Enlacecontexto

https://github.com/asanzdiego/curso-git-github-markdown-2015

-[Enlacecontexto](https://github.com/asanzdiego/curso-git-github-markdown-2015)

-Enlacesencillo:-<https://github.com/asanzdiego/curso-git-github-markdown-2015>

Page 101: Git, GitHub y Markdown

7.15IMÁGENESEsteobraestábajounalicencia:

CreativeCommonsBYSA-Esteobraestábajounalicencia:

![CreativeCommonsBYSA](../img/cc-by-sa.png)