9 Sep 2010, 1:52pm
Projects:
by

leave a comment

  • My GitHub Cheat Sheet

    Some git commands that I’ve been using the most while working with projects on GitHub:

    Standard stuff:

    git add file.ext
    git status
    git commit -am "Message"
    git push origin master

    To create a patch:

    git clone git://github.com/user/project.git
    cd project
    git checkout -b fix_something
    (fix that something)
    git commit -a -m "Fix something"
    git log
    git format-patch master --stdout > fix_something.patch

    To tag:

    git tag -a v1.2.3 -m "Tag v1.2.3"
    git push --tags git@github.com:user/project.git

    To merge from another branch:

    git remote add --track master project git://github.com/otheruser/otherproject.git
    git remote
    git fetch project
    git merge project/master
    (resolve any conflict)
    git commit -a -m "Merge from otheruser/otherproject"
    git push git@github.com:youruser/yourproject.git

    To bisect:

    git bisect start
    git bisect good a1217cdc2e05dfd5672b
    git bisect bad HEAD
    git bisect run command.sh

    Related Posts:

    • ...

    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>

     

    Recent Posts

    Recent Comments

    • Cliffano Subagio: Good to hear about your opportunity to visit Japan, I’m sure you will have a great...
    • Kayla: I’m going to Japan for two week this summer. Our sister city is Tsubame, Japan and my school has an...
    • poseidonfu: thanks,Very effective
    • anonymous: I really enjoyed both the last lecture and the book. I don’t think that theres anyone that I look up...
    • dioni: The thing I hate about HK is how people shove and push in the queue. Can’t they be civilized?!! I kept...

    Most Commented Posts

    Linkroll