Fetch branches from multiple remotes

Git lets you refer to multiple remotes from your local. This strategy helps you refer to different forks of the same repository. However, this also means that time and again you will need to fetch data from all of those remotes to keep your local in sync with them. The easiest way to do that is by running.

git remote update
git remote update --prune

The above commands will fetch the changes from all of your remotes, update your remote tracking branches and also remove any obsolete branches.


Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *