Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.


1.365 visualizaciones

Publicado el

  • Sé el primero en comentar

  • Sé el primero en recomendar esto


  1. 1. Git-TFO A bumblers guide to using Git
  2. 2. While it makes things easier, you don’t have to use it. “Following” people on Github doesn’t GIT you Klout
  3. 3. Local Setup Know which branch you are in using Bash:
  4. 4. Local Setup [mubix@evil:~]$ cat .gitconfig [user] name = Rob Fuller email = [github] user = mubix [alias] ci = commit st = status co = checkout
  5. 5. Local Setup [mubix@evil:~]$ cat .ssh/config Host User git Hostname PreferredAuthentications publickey IdentityFile /var/logs/auth.log.gz
  6. 6. Add it’s upstream git remote add upstream git:// Doesn’t have to be called ‘upstream’ git fetch upstream git merge upstream/master DO NOT git pull upstream master
  7. 7. Previously unknown Internet meme
  8. 8. Forking
  9. 9. Forking leads to... Headaches Staying up all night Nausea Excessive use of coffee
  10. 10. Fork a repository Dead simple....
  11. 11. Set up your local copy git clone proceed to screw things up
  12. 12. Fetch, Pull, Push, Merge Definitely coded/designed by testosterone Fetch, gets changes but gives you the chance handle conflicts Pull, auto merges changes Merge
  13. 13. git branch Use branches, working on ‘master’ will only cause you to get gray hairs
  14. 14. Stash (non-committal) git stash save “xyz fix” (work on something else) git stash apply git stash list
  15. 15. git reset/revert reset undoes uncommitted changes can be used to fix things when on a fork revert makes a new commit that undoes a previous commit
  16. 16. It’s committed and you are dumb git branch old git reset --hard HASH_FROM_UPSTREAM git pull upstream master (shouldn’t need anything) git push origin :master git push origin master Then salvage what you need from ‘old’
  17. 17. GUIs Free ‘Github’ for Mac SourceTree (awesomesauce) (also Mac)
  18. 18. Thanks... Rob And don’t work on master!