Git how to fetch all the remote branches locally

To fetch the remote branches of the remote repository in Git.

Run the following command:

	git fetch --all

The command will fetch the remote branches from the all the configured repository.

The following script first gets the current revision for HEAD, then calls the same command for the short version:

$ git rev-parse HEAD
edc24971b373d63023e30175aacd8fd264cc0584
$ git rev-parse --short HEAD
edc2497
$

References:

Git

Recent Comments