Github

Daugelis jau pradėjo naudoti git’ą vietoj svn’o, pradėjome ir mes. Tačiau, kadangai esu pripratęs prie svn’o, tai kaikurie dalykai privertė googlinti ir klausti pažįstamų.

Svn komandos:
$ svn update
$ svn commit

Git komandos:
$ git stash
$ git pull
$ git stash pop
$ git commit
$ git push

Git’as įdomus tuo, kad neleidžia daryti pull‘int jeigu kažkas pakomitino prieš tave ir pas tave yra pakeistų failų. Tam reikia stash ir stash pop komandų. Dėkui Eimantui už manualą :) Bandant daryti pull tiesiog rašo “<insert fileName here> is not uptodate.”

2 Comments

  • 1
    October 20, 2009 - 14:56 | Permalink

    git stash dar reikalingas tam, kad galėtum nesukomitintus pakeitimus pritaikyti kitame branch:e. Pvz.:

    Atėjai ryte miegodamas ir pradėjai programinti ‘master’ branch:e tai, kas priklausytų ‘feature’ branch:e. Išgėręs kavos pabudai ir supratai, kad visi pakeitimai reikalingi ‘feature’ branch:e. Taigi darai:
    $ git stash
    $ git checkout feature
    $ git stash pop

    Ir voila! Visi tavo pakeitimai kitame branch:e be jokio komito! Ir masteris sveikas, ir feature updatintas .}

  • 2
    keepitmassive
    October 23, 2009 - 22:31 | Permalink

    Neseniai teko domėtis, tai GIT puslapy yr toks “SVN Crash Course” – rekomenduoju paskaityt: http://git-scm.com/course/svn.html

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>