KatPadi's Point

Tag: git

Git: Squash Commits

With git it’s possible to squash previous commits into one before sharing them with others. Step 1 For example you want to squash your last 3 commits: git rebase -i HEAD~3 On the other hand, if you want to just simply squash all the unpushed commits: git rebase -i origin/master If you have many commits and…

.gitignore All The Files!

This is an example of a .gitignore file that will ignore all files except the ones you specify. This is what I’ve been using for my WordPress development. Note: This is a product of constant research (aka Google-ing) and failed development practices. /* !.gitignore !themes themes/* !themes/katpadi-theme The first line says that it will ignore ALL…