O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Git

47 visualizações

Publicada em

Slides from tutorial/introduction session on Git as part of https://www.meetup.com/fedsa-community/events/273527394/

Publicada em: Tecnologia
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Git

  1. 1. Git
  2. 2. Hi Robert @rmaclean sadev.co.za devconf.co.za developerug.org.za
  3. 3. What is Git? Source control Tool for sharing Tool for learning Tool to make experiments easy A FREAKING TIME MACHINE Going to show command line & GUI
  4. 4. What do we have to cover 1. Get Git 2. Config 3. Init Git 4. Status 5. Add file 6. Commit 7. Log 8. Undo 9. Diff 10. GitHub 11. Clone 12. Fork 13. Push & Pull 14. Pull Request
  5. 5. How to get Git Download from: git-scm.com Or from your favourite package manager Mac: $ brew install git Debian: $ apt-get install git Windows: $ winget install git Or it is in your favourite development tools 💕
  6. 6. Just text files Name & email are the most (only) important $ git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com Config
  7. 7. Init Creates a new empty repo
  8. 8. Status Shows you the status
  9. 9. Add Files can be untracked, so this tells git to start tracking them Git can then know if it modified or unmodified Add tells git to both start tracking (if needed) and stage it Staging means you can choose what to save each time Tip: . = wildcard
  10. 10. Commit Tells Git to save a copy of the work Add a message to help you remember it
  11. 11. Log Just look through your history Can see the magic commit numbers
  12. 12. Undo Restore an uncommit change (was also Reset before) Reset is to rollback history --hard undo rollback files vs. making files modified
  13. 13. Diff See the differences… Personally prefer gui tools for this
  14. 14. GitHub Most important thing is this is an Octocat
  15. 15. GitHub Central location for your code, documents… anything Can be private or public Great for sharing github.com/South-Africa-Government- Procurement/Data-cleaning
  16. 16. Clone Make a copy of the source Sets a remote location too so you can update later Something you do very rarely Internal work, used External work, not used
  17. 17. Fork Make a copy of a repository in GitHub Gives you a place you control All part of GitHub
  18. 18. Pull & Push Push upload to server Pull get from server
  19. 19. Pull Request Compare a fork to another repo and make a difference Create a document and allow the owners of the other repo to accept it Way to send code from your place of play, to others
  20. 20. Never forget 😎

×