Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 811 Bytes

README.md

File metadata and controls

37 lines (25 loc) · 811 Bytes

Snippets

  • Purge all local changes:
repo forall -c 'git reset --hard ; git clean -fdx' 
  • Find the Commit Hash for the Desired Date:
repo forall -c 'git log --before="2023-09-16" -n 1 --pretty=format:"%H"'
  • This command will output the commit hash of the last commit before the specified date in each repository managed by repo:
repo forall -c 'git log --before="2023-09-16" -n 1 --pretty=format:"%H"'
  • Checkout the commit before the specified date in each repository managed by repo:
repo forall -c 'git checkout $(git log --before="2023-09-16" -n 1 --pretty=format:"%H")'
  • Checkout lates commit in each repository managed by repo:
repo forall -c 'git checkout -'

Create a patch from the last commit:

git format-patch -1