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.

Senko Rašić

November 07, 2012
Tweet

More Decks by Senko Rašić

Other Decks in Programming

Transcript

  1. 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.
  2. 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
  3. App Start Contest git branch V1 V2 V3 . .

    . Exp V4 Exp V5 "master" branch "experiment" branch
  4. 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
  5. App Start Contest git merge V1 V2 V3 merge V4

    reg-1 reg-2 fb-1 fb-2 report-1 report-2 fb-3
  6. 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
  7. App Start Contest Git "server" Dijeljeni direktorij (Dropbox, ...) GitHub,

    Bitbucket, Assembla, ... Self hosted (gitlab, gitolite, SSH)
  8. App Start Contest GitHub flow : 0. clone (fork) origin

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

    report master git checkout report master report
  10. 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"
  11. App Start Contest GitHub flow : 3. push Mirko (laptop)

    origin (GitHub) git push origin report:report report
  12. 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?"
  13. App Start Contest GitHub flow : 6. merge master report

    git checkout master git merge report
  14. App Start Contest "Release" branch A B C . .

    . Ver1 Ver1 hotfix "master" branch "version-1" branch
  15. 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
  16. 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
  17. App Start Contest Više informacija Uvod u Git http://bit.ly/LDqq0N How

    GitHub uses GitHub to build GitHub http://bit.ly/n3a5VZ