SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
3º Encontro DeSif



Git rápido e simples
      Gleison Rodrigues
      xgleisonx@gmail.com
3º Encontro DeSif

                         Sumário
●   Historia
●   Quem usa git?
●   Interface
●   Fluxo de Trabalho no git
●   Boas Práticas
3º Encontro DeSif

                             História
●   Criado por Linus Torvalds em 2005.
●   Nome vem de uma brincadeira com a gíria “git” e o Kernel criado por
    Linus levar seu nome.
●   Sistema de Versionamento Distribuído com foco em seu
    desempenho.
●   Desenvolvido voltado para o versionamento do kernel Linux que
    antes era versionado com software proprietário.
3º Encontro DeSif

   Quem usa git?

       DeSif
3º Encontro DeSif

                               Interface
●   Os comandos do git são passados como parâmetros após a
    chamada desde na linha de comando.
                   $ git <comando> <opções> <parâmetros>

●   Existem interface gráficas, e plugins para IDE’s, que facilitam o uso
    das funcionalidades do git sem ter que usar o terminal.
                           NetBeans: http://nbgit.org/
                         Eclipse: http://eclipse.org/egit/
●   gitk e git-gui são interfaces gráficas nativas.
●   Para windows o tortoisegit é́ uma das melhores opções.
                                                       ̃
                      http://code.google.com/p/tortoisegit/
3º Encontro DeSif

             Fluxo de trabalho no git
●   O uso dos comandos do git pode ser resumido em uma rotina diária
    que abragem as necessidades do cotidiano com um versionador.




          Figure: http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html
3º Encontro DeSif
3º Encontro DeSif

                              Truques
●   Usando interface gráfica para verificar duplicidade (diff)e resolver
    conflitos (mergetool). O meld entra em cena.
3º Encontro DeSif

                  gitconfig
[alias]
 st = status
 ci = commit
 br = branch
 co = checkout
 df = diff
 lg = log -p
 rb = rebase

[color]
    ui = true

[merge]
    tool = meld
3º Encontro DeSif

                         gitconfig
[mergetool "meld"]
  cmd = $HOME/.scripts/git_meld_merge.sh $BASE $LOCAL $REMOTE
$MERGED

[diff]
     tool = meld
     external = $HOME/.scripts/git_meld_diff.sh

[mergetool]
    keepBackup = false
3º Encontro DeSif

#######################################
git_meld_diff.sh

#!/bin/bash
meld "$2" "$5"



#######################################
3º Encontro DeSif

#######################################
git_meld_merge.sh

#!/bin/bash
meld "$2" "$1" &
sleep 0.5
meld "$1" "$3" &
sleep 0.5
meld "$2" "$4" "$3"



#######################################
3º Encontro DeSif

    Dúvidas???
3º Encontro DeSif

                             Material.
●   Base para essa apresentação.
    ●   Git o básico.
    ●   Git + github.
    ●   Git.
    ●   Desvendando o git.

Mais conteúdo relacionado

Destaque

IAK Original Collections Presentation
IAK Original Collections PresentationIAK Original Collections Presentation
IAK Original Collections Presentationtiara77
 
Berlin History Trip
Berlin History TripBerlin History Trip
Berlin History Triphumbellina
 
Amir zmora WebRTC state of the market and trends
Amir zmora   WebRTC state of the market and trendsAmir zmora   WebRTC state of the market and trends
Amir zmora WebRTC state of the market and trendsAmir Zmora
 
Erm dix&eaton sustainability 021114
Erm dix&eaton sustainability 021114Erm dix&eaton sustainability 021114
Erm dix&eaton sustainability 021114Kevin Poor
 
The Cold War Begins
The Cold War BeginsThe Cold War Begins
The Cold War Beginshumbellina
 
WebRTC Webinar & Q&A - Debugging Networking Issues in WebRTC
WebRTC Webinar & Q&A - Debugging Networking Issues in WebRTCWebRTC Webinar & Q&A - Debugging Networking Issues in WebRTC
WebRTC Webinar & Q&A - Debugging Networking Issues in WebRTCAmir Zmora
 
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...Amir Zmora
 
Research analysis: getting more from your data
Research analysis: getting more from your dataResearch analysis: getting more from your data
Research analysis: getting more from your datacxpartners
 
Chinese web design patterns: how and why they’re different (Chui Chui Tan)
Chinese web design patterns: how and why they’re different (Chui Chui Tan)Chinese web design patterns: how and why they’re different (Chui Chui Tan)
Chinese web design patterns: how and why they’re different (Chui Chui Tan)cxpartners
 
Current Business Resume 2
Current Business Resume 2Current Business Resume 2
Current Business Resume 2Sharon_Lehto
 

Destaque (11)

Frameworks para C 3º DeSif
Frameworks para C 3º DeSifFrameworks para C 3º DeSif
Frameworks para C 3º DeSif
 
IAK Original Collections Presentation
IAK Original Collections PresentationIAK Original Collections Presentation
IAK Original Collections Presentation
 
Berlin History Trip
Berlin History TripBerlin History Trip
Berlin History Trip
 
Amir zmora WebRTC state of the market and trends
Amir zmora   WebRTC state of the market and trendsAmir zmora   WebRTC state of the market and trends
Amir zmora WebRTC state of the market and trends
 
Erm dix&eaton sustainability 021114
Erm dix&eaton sustainability 021114Erm dix&eaton sustainability 021114
Erm dix&eaton sustainability 021114
 
The Cold War Begins
The Cold War BeginsThe Cold War Begins
The Cold War Begins
 
WebRTC Webinar & Q&A - Debugging Networking Issues in WebRTC
WebRTC Webinar & Q&A - Debugging Networking Issues in WebRTCWebRTC Webinar & Q&A - Debugging Networking Issues in WebRTC
WebRTC Webinar & Q&A - Debugging Networking Issues in WebRTC
 
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
WebRTC Webinar & Q&A - W3C WebRTC JS API Test Platform & Updates from W3C Lis...
 
Research analysis: getting more from your data
Research analysis: getting more from your dataResearch analysis: getting more from your data
Research analysis: getting more from your data
 
Chinese web design patterns: how and why they’re different (Chui Chui Tan)
Chinese web design patterns: how and why they’re different (Chui Chui Tan)Chinese web design patterns: how and why they’re different (Chui Chui Tan)
Chinese web design patterns: how and why they’re different (Chui Chui Tan)
 
Current Business Resume 2
Current Business Resume 2Current Business Resume 2
Current Business Resume 2
 

Git, meld e dicas 4º DeSif

  • 1. 3º Encontro DeSif Git rápido e simples Gleison Rodrigues xgleisonx@gmail.com
  • 2. 3º Encontro DeSif Sumário ● Historia ● Quem usa git? ● Interface ● Fluxo de Trabalho no git ● Boas Práticas
  • 3. 3º Encontro DeSif História ● Criado por Linus Torvalds em 2005. ● Nome vem de uma brincadeira com a gíria “git” e o Kernel criado por Linus levar seu nome. ● Sistema de Versionamento Distribuído com foco em seu desempenho. ● Desenvolvido voltado para o versionamento do kernel Linux que antes era versionado com software proprietário.
  • 4. 3º Encontro DeSif Quem usa git? DeSif
  • 5. 3º Encontro DeSif Interface ● Os comandos do git são passados como parâmetros após a chamada desde na linha de comando. $ git <comando> <opções> <parâmetros> ● Existem interface gráficas, e plugins para IDE’s, que facilitam o uso das funcionalidades do git sem ter que usar o terminal. NetBeans: http://nbgit.org/ Eclipse: http://eclipse.org/egit/ ● gitk e git-gui são interfaces gráficas nativas. ● Para windows o tortoisegit é́ uma das melhores opções. ̃ http://code.google.com/p/tortoisegit/
  • 6. 3º Encontro DeSif Fluxo de trabalho no git ● O uso dos comandos do git pode ser resumido em uma rotina diária que abragem as necessidades do cotidiano com um versionador. Figure: http://zrusin.blogspot.com/2007/09/git-cheat-sheet.html
  • 8. 3º Encontro DeSif Truques ● Usando interface gráfica para verificar duplicidade (diff)e resolver conflitos (mergetool). O meld entra em cena.
  • 9. 3º Encontro DeSif gitconfig [alias] st = status ci = commit br = branch co = checkout df = diff lg = log -p rb = rebase [color] ui = true [merge] tool = meld
  • 10. 3º Encontro DeSif gitconfig [mergetool "meld"] cmd = $HOME/.scripts/git_meld_merge.sh $BASE $LOCAL $REMOTE $MERGED [diff] tool = meld external = $HOME/.scripts/git_meld_diff.sh [mergetool] keepBackup = false
  • 12. 3º Encontro DeSif ####################################### git_meld_merge.sh #!/bin/bash meld "$2" "$1" & sleep 0.5 meld "$1" "$3" & sleep 0.5 meld "$2" "$4" "$3" #######################################
  • 13. 3º Encontro DeSif Dúvidas???
  • 14. 3º Encontro DeSif Material. ● Base para essa apresentação. ● Git o básico. ● Git + github. ● Git. ● Desvendando o git.