Lien : https://www.freecodecamp.org/news/git-checkout-remote-branch-tutorial/
git checkout master
git fetch origin
git branch -a
git checkout -b feature origin/feature
Lien : https://riptutorial.com/git/example/2188/copying-a-commit-from-one-branch-to-another
git checkout master
git cherry-pick 653ad38
git push origin master
git show --pretty="" --name-only <commit id>
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch GROS-FICHER' --prune-empty --tag-name-filter cat -- --all
git fetch origin
git merge origin/autrebranche
git push origin master
Ouvrir :
changeNameEmail.sh
Ajouter :
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags