Clean Git log recipe
Simplest way of getting clean commits
This is for contributing when forking projects. It allows me todo multiple work in a simple branch, then cherry pick files with different feature purpose and do PR from those without needing to split up work while retaining a clean git log when doing the PR back to the forked project.
Commands needed
git merge --squash other-branchgit commitgit rebase -i --signoff HEAD~<number_of_commits>git push --force -u originAnd if on a rinse repeat cycle remember todo. to begin from fresh:
git reset --hard <commit_id>