Updating PDM
This might be relevant: Synching a fork.
Get the original repo: git clone git@github.com:ic-hep/pdm.git
Make my own branch (-b makes new branch): git checkout -b mybranch
[now do some work]
Keep in sync with main branch:
git pull
git merge origin/master
Get my own code back into the repo:
Check if only the files that should be changed are: git status
Commit to my branch:
git add README.md install_pdm.py
git commit -m "lovely explanation of what I did"
git push --set-upstream origin mybranch

Updating our DIRAC servers
su - dirac
cd DIRAC
git status
git fetch
git checkout [your favourite tag goes here] (note we are using Tags, noch Branches here)
Then restart DIRAC.
What have I done ?: git reflog

DIRAC: Pull How to create a pull request for DIRACGrid
I am not an admin, for the central DIRAC repo, so I need to fork it.
I forked this repo a while ago, make a clone from it:
git clone git@github.com:marianne013/DIRAC.git
To get it back in sync:
git remote add upstream https://github.com/DIRACGrid/DIRAC.git
Get everything from my repo (just in case): git fetch
Get everything from the central DIRAC repo: git fetch upstream

Make a new branch (here called 'fix_req_user_message') for my code against the correct branch
(here: rel-v6r20, can also be e.g. 'integration' etc) of the upstream repo:
git checkout -b fix_req_user_message upstream/rel-v6r20
now update my code and check it looks good: git status; git diff;
add files I changed: git add [first file] [second file] [...]
add a commit meesage: git commit -m "message goes here"
if I screw this up, fix it with git commit --amend -m "fixed message goes here"
push it back to *my* branch: git push origin fix_req_user_message
Then go to the handy link this command generates and create a pull request. Make sure to create the pull reuqest against the correct branch of central DIRAC.
Add the release number (e.g. [v6r20] in front of the commit message).

Dumping some code in DIRAC-tools
git clone git@github.com:ic-hep/DIRAC-tools
git add afile.py
git commit -m "a comment"
git push -u origin master