git
This is an old revision of the document!
Git
Config
git config --global user.name "User Name"
git config --global user.email name@domain.com
Auto-sign commits:
git config --global commit.gpgsign true
git config --global user.signingkey FINGERPRINT
Init
git clone URL
git init
git remote add NAME URL
git remote add origin URL
Commit
git add *
git commit -m "Commit message"
Signed commit:
git commit -S -m "Commit message"
Pull
git pull
Push
git push NAME BRANCH
git push origin main
Branching
Create a new branch and switch to it:
git checkout -b NAME
Switch to branch:
git checkout NAME
git.1671375727.txt.gz · Last modified: 2022/12/18 16:02 by julian