Remove all your local git branches but keep master

Sometimes after a sprint, all the remaining branches are just taking up space.
Here’s a small snippet to remove all your local branches in one go.
git branch | grep -v "master" | xargs git branch -D
If you want to keep the current branch use
grep -v ^*

.gitignore not working

NOTE : First commit your current changes, or you will lose them.
Then run these commands:
git rm -r --cached .
git add .
git commit -m "fixed untracked files"

Basic git use

In this tutorial we will learn the following: Create a repository on github Install git client Clone the repository on local machine Upload (push) files to github from local Download (pull) files from github to local Description: Create a repository on github: Press on the “+” button on top of...


Imran Pollob

Learn => Practice => Implement => Repeat

Get in touch