git diff <old hash>^..<new hash>git tag <tag name> <commit hash>git tag -lgit stashgit rebase -i HEAD~10 (or however many commits back you want to see)git stash popgit add <files>git commit --amend --no-editgit rebase --continue which will rewrite the rest of your commits against the new onegit stashgit rebase -i HEAD~10 (or however many commits back you want to see)git rebase --continue$ git checkout master
$ git pull origin master
$ git rebase master <branch>
# Make manual changes as needed
$ git rebase --continuePushing a rebased branch to a remote will require --force:
$ git push origin <branch> --forceIMPORTANT: Start with a fresh clone of the repository, not your working copy
git remote rm origingit filter-branch --subdirectory-filter <directory> -- --all$ git reset --hard
$ git gc --aggressive
$ git prune
$ git clean -fddnf install git-cvs rsh$ git cvsimport -v -d <CVS repo path> <module>
# where CVS repo path is similar to
# :pserver:anonymous@a.cvs.sourceforge.net:/cvsroot/pcal$ git apply --reject --whitespace=fix <patch>
$ wiggle --replace <file> <file.rej>export GIT_PAGER=vim -c "runtime! macros/less.vim" -# Install and configure git-email
$ sudo dnf install git-email
$ git config --global user.name "My name"
$ git config --global user.email me@mail.com
# See https://git-send-email.io/
# and https://www.futurile.net/2022/03/07/git-patches-email-workflow/
[sendemail]
smtpserver = smtp.gmail.com
smtpencryption = ssl
smtpserverport = 465
smtpuser = jbru362@gmail.com
smtpPass = !pass gmail/oauth
# Create the patch and send it
$ git format-patch -N # where N is the number of commits from HEAD to include
$ git send-email \
--to maintainer@mail.com \
--smtp-pass $(pass gmail/oauth | head -1) \
<file.patch>
# Use the --annotation switch to edit the email
# Use the --dry-run switch to test