Webdevelopment
Drupal
Betriebssysteme
Design
Sonstige
Standard add zum branch in dem wir grade sind
- git add filename
- git commit -m "Issue #[issue number] by [comma-separated usernames]: [Short summary of the change]."
- git push
Schon wieder error detached head usw yada yada kein tag wo ich nicht was vergesse
- Erst auf den master commiten 2.1.x z.B
- Dann erst release taggen
Lösung für detached head
- <code>git branch temp
- git checkout 2.1.x
- git merge temp</code>
Tag for a new relese
[marco@marco-pc amazon_pa]$ git tag 2.1.0-beta1
[marco@marco-pc amazon_pa]$ git push origin 2.1.0-beta1
so nicht, weil losgelößter head
Was geht ist:
git tag 2.1.0-beta13
git push -u origin 2.1.0-beta13
Update a tag
Jedes mal klappt das nicht
add -a
commit -m "babla"
....
git push origin 2.1.0-beta1
everything up to date....nein
Wenn ich einen neuen tag mache und dann pushe klappt es. ich brauch da ne lösung für...kann doch nicht jedes mal einen neuen tag vergeben
Jedes mal geht irgendwas schief wenn ich ein modul tag releasen will....Anleitung:
- Zeige alle branches: git branch -a
- Branch checkout: git checkout 8.x-1.2
- git tag -d 8.x-1.2
- git push origin 8.x-1.2
Delete tag remotely: git push --delete origin 1.2
https://devconnected.com/how-to-delete-local-and-remote-tags-on-git/
Git Pull
rebase/stash usw.
https://cscheng.info/2017/01/26/git-tip-autostash-with-git-pull-rebase.html
Release notes
https://github.com/mglaman/drupalorg-cli
Example: drupalorg maintainer:release-notes 2.1.0-beta5 2.1.0-beta6
Create new branch and push that
- git checkout 2.0.x
- git pull
- git checkout -b 2.1.x # create a new branch
- git push -u origin 2.1.x # push the new branch to git.drupal.org
ORIGIN: "origin" is a shorthand name for the remote repository that a project was originally cloned from.
Git Guides
http://drupal.org/documentation/git http://drupal.org/node/803746
Git Videos
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
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
Git Problem
error: Fehler beim Versenden einiger Referenzen nach 'git.drupal.org:project/projectname.git'
https://www.programmersought.com/article/4465371795/
https://stackoverflow.com/questions/9378760/git-push-local-branch-with-same-name-as-remote-tag
git tag mit gleichem namen wie branch..schlechte idee
more problems
error: Fehler beim Versenden einiger Referenzen nach 'git.drupal.org:project/amazon_pa.git'
Hinweis: Aktualisierungen wurden zurückgewiesen, weil die Spitze Ihres aktuellen
Hinweis: Branches hinter seinem externen Gegenstück zurückgefallen ist. Führen Sie
Hinweis: die externen Änderungen zusammen (z. B. 'git pull ...') bevor Sie "push"
Hinweis: erneut ausführen.
Hinweis: Siehe auch die Sektion 'Note about fast-forwards' in 'git push --help'
Hinweis: für weitere Details.
https://stackoverflow.com/questions/20467179/git-push-rejected-non-fast-forward