===== Git =====
== cheatsheet ==
{{ :downloads:git-cheatsheet.pdf |}}
== best practice ==
[[https://blog.panter.ch/2016/08/31/5-rules-to-git-better.html| 5 rules to git better ]]
Guide [[https://www.conventionalcommits.org/de/v1.0.0/| Convention for commits]] how commits should/could look like.
=== Submodules ===
Some Repositories contain submodules to import from other Repositories.
This should be documented somewhere in the README. \\
You can **guess** that submodules are used if there are **empty directories**.
git submodule init
git submodule update [--recursive]
=== Store password ===
git config --system credential.helper /usr/libexec/git-core/git-credential-libsecret
//On older systems (Centos/Rhel 7.6, Fedora 25, Ubuntu 18.04)://
git config --global credential.helper gnome-keyring
===== git-svn =====
[[http://git-scm.com/docs/git-svn | documentation]]
git svn clone https:// -T trunk -b branches -t tags
== Clean up the log ==
The log created from svn will contain some wrong email and user name entries wich will not be linked to the GitLab user names and emails.
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "oldusername" ];
then
GIT_AUTHOR_NAME="Fistname Name";
GIT_AUTHOR_EMAIL="email_addresss@registerd.in.our.idm";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
===== Password change =====
When a new user password was chosen it happens that the existing gnome-keyrings can not be unlocked with the new password. If the user does not longer know its old password the keyrings can be reset by deleting the folder `keyrings` in its home directory:
rm -r ~/.local/share/keyrings
=== Note ===
After deleting the user must re-login!