“It's what you do in the present that will redeem the past and thereby change the future.”

— Paulo Coelho

Prologue

This is a collection of useful Git commands that is helpful but in rare cases.

This article will be updated from time to time.

You may also like: Linux Cheat Sheet
You may also like: Docker Cheat Sheet


Commands

Remove committed files after updating .gitignore

1
2
3
git rm -r --cached . # Remove the files from the index
git add . # Commit again
git commit -m "update: re-ignore files"

Epilogue

To be continued…