Netzflut

Webdesign, Webentwicklung, Drupal & Zeuchs

GIT Hilfe

Inhaltsverzeichniss

    Git Guides

    http://drupal.org/documentation/git
    http://drupal.org/node/803746

    Git Videos

    http://vimeo.com/20459209

    Cheatsheets

    http://help.github.com/git-cheat-sheets/

    Netbeans

    http://netbeans.org/kb/docs/ide/git.html
    https://freistil.zendesk.com/entries/296158-website-pflege-mit-git | READ
    http://www.slideshare.net/chacon/git-101-presentation

    Github

    https://github.com/selste/openDrive/wiki/GitBasics

    Git Workflow

    repo clonen
    git clone https://git.foo.domain.net sitename

    add files
    git add FILE1 FILE2
    committen
    git commit -m "meine commit message"
    einchecken
    git push origin master

    Git Patch

    Git Patches per Konsole

    http://drupal.org/patch/apply

    Git apply geht nicht?

    dann probiere:
    patch -p1 < patchfile.patch

    Create a patch

    Drupal Example:
    git diff -w > [project_name]-[short-description]-[issue-number]-[comment-number].patch

    (-w heißt ohne drauf zu achten das extra whitespace dzu oder weg gekommen ist, whitespace ignore)

    http://drupal.org/node/707484

    Latest Git with Linux/Debian

    sources list add:
    deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free
    apt-get -t lenny-backports install git

    git version check:
    git --version

    Userdaten festlegen

    http://wiki.dreamhost.com/Git
    git repo-config --global user.name "Your Name"
    git repo-config --global user.email "yournick@yourmailserver.com"
    das landet in .gitconfig im linux userfolder (z.B /root)

    Branches

    Zeige alle branches:
    git branch -all

    Branch wechseln:
    git checkout banchname

    Branch anlegen:
    git branch marco-theming

    Mergen (vorher pullen)
    git merge thomas-theming-3

    Git Merge

    http://book.git-scm.com/3_basic_branching_and_merging.html

    Git bisect (Fehlersuche)

    http://blog.erdfisch.de/2011/09/good-or-bad-fehlersuche-mit-git-bisect

    Alles in einem folder direkt commiten

    git commit -am "message"

    Fehler

    Return Code 22

    error: Cannot access URL http://git.drupal.org/project/taxonomy_block.git/, return code 22
    fatal: git-http-push failed

    Fix:

    git remote rm origin
    git remote add origin USERNAME@git.drupal.org:project/taxonomy_block.git

    Give the patch author the credit

    http://www.bywombats.com/blog/09-06-2011/giving-credit-where-credit-due

    Design&Code: