git config --global user.email "[email protected]"
git config --global user.name "Your Name"git config --list --show-scope
# Edit Git config Global
nano ~/.gitconfig
# Edit Git config local repo
nano .git/configgit mv <source> <directory>/<new_source_name>git branch -r | grep -i <query>Local:
git branch -d "branch_name"Remote:
git push origin --delete "branch_name"git rebase "branch_name"
:wq
git rebase --continue
git push --forcegit push --set-upstream origin "branch_name"git checkout "branch_name_old"
git branch -m "branch_name_new"
git push origin :"branch_name_old" "branch_name_new"
git push origin -u "branch_name_new"for b in `git branch --merged | grep -v \*`; do git branch -D $b; donegit commit --amend -m "New commit message"git revert commit_hashgit stash push --keep-index --include-untracked -m "message"git stash push -m "message" --stagedgit switch -git checkout -b "branch_name" "commit_hash"git clean -f -dnpm install --legacy-peer-deps
yarn install --peergit reset --soft ORIG_HEADgit cherry-pick A
git cherry-pick A^..B`git ls-files | xargs wc -ldocker exec container_name \
sh -c 'mysqldump -u root -p<password> database_name > /tmp/database_name.sql'
docker cp container_name:/tmp/database_name.sql ./database_name.sql