Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung Nächste Überarbeitung Beide Seiten der Revision | ||
git_-_command_uebersicht [2017/09/04 09:32] admin |
git_-_command_uebersicht [2018/10/17 15:03] admin [bash git prompt] |
||
---|---|---|---|
Zeile 12: | Zeile 12: | ||
[alias] | [alias] | ||
forcepull = "!git fetch ; git reset --hard @{u}" | forcepull = "!git fetch ; git reset --hard @{u}" | ||
+ | </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=Single_line_Ubuntu | ||
+ | #GIT_PROMPT_THEME=Solarized | ||
+ | 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> | </code> |