Git Cheat Sheet

June 15, 2021

To initialize git project

$ git init

To clear the .gitignore cache

$ git rm -r --cached .
$ git add .
$ git commit -m ".gitignore is now working"

To remove specific file from git cache

$ git rm --cached filename

To list the remote repos

$ git remote -v

To add the remote repo

$ git remote add origin <repo_url>

Profile picture

I'm a software engineer, lives in Chennai, India. Full Stack developer and Certified Microsoft Azure DevOps Expert. Love to travel, cycling, reading non-fiction books, architecture photography. Fan of Minimalism.
More about me → My Projects →