Advertisement
Guest User

Untitled

a guest
May 3rd, 2022
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1. commits=""
  2. log=$(git log --oneline --author=dmitry.selyutin@3mdeb.com src/openpower/sv/sv_binutils.py)
  3. for commit in $(echo "${log}" | awk '{ print $1; }'); do
  4.     commits="${commit} ${commits}"
  5. done
  6.  
  7. for old in ${commits}; do
  8.     git checkout ${old}
  9.     git commit --amend --no-edit --reset-author
  10.     new=$(git rev-parse --short HEAD)
  11.     git checkout master
  12.     git replace ${old} ${new}
  13.     git checkout master
  14. done
  15. git filter-branch -- --all
  16. for old in ${commits}; do
  17.     git replace -d ${old}
  18. done
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement