git add .
git commit -am "message"
git remove chemin/fichier
git log --oneline
git log -p
git show ***hash***
git mv
git rm
git checkout -
git checkout -b nouvelle-branche
git branch -M main
git branch --set-upstream|unset-upstream xxx
git rebase -i HEAD~5 # réécriture de l'historique sur les 5 derniers commits
git commit --amend -m "nouveau msg" # réécrire le message du dernier commit
git reflog # consultation des logs de référence
git fetch origin
git reset --hard origin/master
# ou plus funky
git reset --hard @{u}
git clean -df
git remote -v
git remote add origin user@domain:repo
git remote rename origin backup-origin
git remote rm backup-origin
git config --system | global | local --list
git config --global user.email "monemail@mail.com"
npm i xxx
npm i --save-dev xxx
npm run nom_script_npm
npm start
npm uninstall xxx
npm ci
npm ping
npm doctor
npm install -g npm@latest
Depuis node 16.10 yarn
est géré à travers Corepack qu'il faut activer (opt-in).
# Depuis Node.js >=16.10
corepack enable
yarn set version stable
# Avant Node.js <16.10
npm i -g corepack