Useful Git tips and tricks
Some handy git tips in this post, check it out
is a developer, technical writer, and a (former) designer.
This article lists some experiences from working with Git on different projects.
Image by Unsplash
Clean all updates on the current branch
I have worked on a project where due to how the project was setup, whenever I’d checkout a brand new branch, a couple of files would be automatically added. The
.gitignore file was not setup to not track those files due to a number of reasons. Thus, the first thing I had to do when I’d checkout a new branch was to quickly remove add the tracked changes, so that I could have a clean slate to work with.
So, once you’ve checked out your brand new branch, the command to clean up all the automatic changes is actually really simple. Here goes:
git checkout .
To be continued…