Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
git_-_command_uebersicht [2017/09/04 09:30] admin |
git_-_command_uebersicht [2023/07/26 09:47] (aktuell) admin [git "Umzug"] |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== git - Command Übersicht ====== | ====== git - Command Übersicht ====== | ||
- | <code lang=git> | + | <code bash> |
# Passwort Cache aktivieren und Timeout verlängern | # Passwort Cache aktivieren und Timeout verlängern | ||
git config --global credential.helper cache | git config --global credential.helper cache | ||
Zeile 6: | Zeile 6: | ||
</code> | </code> | ||
- | <code lang=perl> | + | <code bash> |
# git "forcepull" | # git "forcepull" | ||
# vi .git/config | # vi .git/config | ||
Zeile 13: | Zeile 13: | ||
forcepull = "!git fetch ; git reset --hard @{u}" | forcepull = "!git fetch ; git reset --hard @{u}" | ||
</code> | </code> | ||
+ | |||
+ | ===== bash git prompt ===== | ||
+ | <code bash> | ||
+ | cd ~ | ||
+ | git clone https://github.com/magicmonty/bash-git-prompt.git .bash-git-prompt --depth=1 | ||
+ | </code> | ||
+ | <code bash> | ||
+ | # vi /home/<my-user>/.bashrc | ||
+ | # ... | ||
+ | GIT_PROMPT_ONLY_IN_REPO=1 | ||
+ | # GIT_PROMPT_STATUS_COMMAND=gitstatus_pre-1.7.10.sh. # git --version < 1.7.10 | ||
+ | #GIT_PROMPT_THEME=Solarized | ||
+ | GIT_PROMPT_THEME=Single_line_Ubuntu | ||
+ | source ~/.bash-git-prompt/gitprompt.sh | ||
+ | </code> | ||
+ | ===== git "Umzug" ===== | ||
+ | |||
+ | Will man z.B. von einem gitlab auf einen reinen GIT-Server (z.B. auf einer Synology) umziehen, kann dies mit ''git bundle'' exportiert werden. | ||
+ | <code bash> | ||
+ | # local (laptop) | ||
+ | cd <mein-gitlab-projekt> | ||
+ | git bundle create <mein-gitlab-projekt>.bundle --all | ||
+ | cd .. | ||
+ | # remote (synology) | ||
+ | cd /volume1/git | ||
+ | mkdir <mein-git-projekt> | ||
+ | cd <mein-git-projekt> | ||
+ | git init --bare | ||
+ | # local (laptop) | ||
+ | git clone git@<meine-synology>:/volume1/git/<mein-git-projekt> | ||
+ | cd <mein-git-projekt> | ||
+ | git pull ../<mein-gitlab-projekt>/<mein-gitlab-projekt>.bundle | ||
+ | git push | ||
+ | |||
+ | </code> | ||
+ | ===== selfsigned certificates ===== | ||
+ | |||
+ | Sollten beim Git-Server "selfsigned certificates" eingesetzt werden, kann man git konfigurieren, dass keine ssl-Überprüfung mehr stattfindet. | ||
+ | |||
+ | <code> | ||
+ | git config http.sslVerify false | ||
+ | </code> | ||
+ | |||
+ |