No More Manual Pulling: How to Automatically Pull All Git Branches from Remote to Local

I'm an engineering senior at National Institute of Technology, Srinagar, India. I'm a developer, fitness aficionado, productivity enthusiast and a fellow nerd.
Search for a command to run...

I'm an engineering senior at National Institute of Technology, Srinagar, India. I'm a developer, fitness aficionado, productivity enthusiast and a fellow nerd.
No comments yet. Be the first to comment.
If you are like me and just at the start of your coding journey, git rebase --interactive might be a scary command. I feared that if anything went wrong I would lose a lot of my code and have to do that work all over again. But that was the point of ...

To add the current date and time to a file in Vim / Neovim use the following command in command mode :.!date

Location of Neovim configuration file, init.vim

Install and apply colorschemes or themes in neovim

VS code like code runner in Neovim with a simple script.

When you clone a repo to your local machine, it doesn't pull all the branches to your local. Then you have to manually pull the branches you want.
To pull all the branches from the remote, run the following command
git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
Done!