Is there a way to know the list of branches a repository has before cloning?
I tried the following command, but it doesn't seem to work for me:
git ls-remote [email protected]:Username/project.git
Edit solution:
git ls-remote http://www.github.com/Shopify/react-native-skia --h --sort origin "refs/heads/*"
In a single line, locally,
git ls-remote /url/of/the/upstream/repo
should list the remote HEADs and their associated branches without cloning anything.For example, if you wanted to see the branches of Shopify/react-native-skia you would run
git ls-remote https://github.com/Shopify/react-native-skia.git
which should return