Some Scripts

2022-01-17

Extract album cover image from MP3 file

ffmpeg -i music.mp3 file.jpg

Move current to previous

git checkout HEAD^

Copy current commit to this branch

git rebase main

Move main to c6

git branch -f main c6

Jump to the previous commit

git reset HEAD^

Jump to the this commit

git reset C3

New commit C2 introduces changes – it just happens to introduce changes that exactly reverses the commit of C2

git revert HEAD

Copy commit to current branch:

git cherry-pick C3 C4

Interactive rebase, choose commits manually

git rebase -i HEAD~4

Tag a commit

git tag v0 c1

Finds the most recent tag that is reachable from a commit

git describe <ref>