Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kako koristiti i iskoristiti Git

Kako koristiti i iskoristiti Git

Talk about Git usage best practices at eStudent App Start Contest 2012. Croatian language.

382b18eebb1386e80ff7e20fd1eb784e?s=128

Senko Rašić

November 07, 2012
Tweet

Transcript

  1. App Start Contest Timski razvoj aplikacija Kako koristiti i iskoristiti

    Git
  2. App Start Contest

  3. App Start Contest Git (Distribuirano) verzioniranje sadržaja (CVS, SVN, TFS,

    Bazaar, Darcs, Perforce, ...)
  4. App Start Contest Git V1 V2 V3 . . .

  5. App Start Contest Single-user Git Beskonačni undo

  6. App Start Contest git checkout V1 V2 V3 V4 git

    checkout V2 V1 V2
  7. App Start Contest Single-user Git Dokumentacija

  8. App Start Contest git log V1 V2 V3 . .

    . Započeo projekt, zasad samo početni ekran Dodao ulogiravanje korisnika i kreiranje računa Dodao slanje poruka drugim korisnicima 1.1.2012. 12.3.2012. 28.5.2012.
  9. App Start Contest git log V1.1.1 V1.1.2 V1.1.3 . .

    . Dodao tablicu Korisnik u bazu Prepravio Korisnik tablicu, želimo imati samo jedno polje za ime i prezime (http://bit.ly/92Lw0V) Dodao triggere jer SQLite nema foreign key constraintove prije 3.6.19 :( 5.1. 16:53 5.1. 17:28 5.1. 19:13
  10. App Start Contest Single-user Git Eksperimentiranje

  11. App Start Contest git branch V1 V2 V3 . .

    . Exp V4 Exp V5 "master" branch "experiment" branch
  12. App Start Contest feature branches V1 V2 V3 . .

    . reg-1 reg-2 "master" branch "user-registration" branch fb-1 fb-2 report-1 report-2 "connect-to-facebook" branch "reports" branch
  13. App Start Contest git merge V1 V2 V3 merge V4

    reg-1 reg-2 fb-1 fb-2 report-1 report-2 fb-3
  14. App Start Contest Timski rad (napokon) V1 V2 V3 merge

    V4 reg-1 reg-2 fb-1 fb-2 report-1 report-2 fb-3 Mirko Slavko Ana "master" branch
  15. App Start Contest Git "server" Dijeljeni direktorij (Dropbox, ...) GitHub,

    Bitbucket, Assembla, ... Self hosted (gitlab, gitolite, SSH)
  16. App Start Contest Git "klijent"

  17. App Start Contest Git repository origin Slavko Ana Mirko

  18. App Start Contest GitHub flow : 0. clone (fork) origin

    (GitHub) Mirko (laptop) git clone github.com/org/projekt.git
  19. App Start Contest GitHub flow : 1. branch git branch

    report master git checkout report master report
  20. App Start Contest

  21. App Start Contest GitHub flow : 2. commit git add

    file1 file2 ... git commit report v1 report v2 Psst, hint: "add" zapravo nije "add" nego "prepare"
  22. App Start Contest GitHub flow : 3. push Mirko (laptop)

    origin (GitHub) git push origin report:report report
  23. App Start Contest GitHub flow : 4. pull request master

    report "Hey, I just pushed, and this is crazy, but here’s my commit, so merge it maybe?"
  24. App Start Contest GitHub flow : 5. code review

  25. App Start Contest GitHub flow : 6. merge master report

    git checkout master git merge report
  26. App Start Contest GitHub flow : 7. pull origin (GitHub)

    Mirko (laptop) git pull origin
  27. App Start Contest "Release" branch A B C . .

    . Ver1 Ver1 hotfix "master" branch "version-1" branch
  28. App Start Contest Automatizirani build origin (GitHub) buildbot (Travis-CI) git

    clone github.com/org/projekt.git pip install -r requirements.txt make test merge
  29. App Start Contest Automatizirani build

  30. App Start Contest Continuous deployment (web) Master always deployable Small

    changes
  31. App Start Contest Continuous deployment (web) origin (GitHub) buildbot (Travis-CI)

    git clone github.com/org/projekt.git pip install -r requirements.txt make test git push heroku merge production (Heroku) success fail
  32. App Start Contest Više informacija Uvod u Git http://bit.ly/LDqq0N How

    GitHub uses GitHub to build GitHub http://bit.ly/n3a5VZ
  33. App Start Contest Demo time