Reputation: 27
I know there is git branch -a
that lists the branches in the repository but how do I see the files inside this branch when the repository is remote (can't access it from the github website).
Upvotes: 1
Views: 96
Reputation: 4409
Short of using the GitHub API or another hack, it's not really possible to do this without pulling down the repository first. However, you can if you do pull from the remote.
In order to fetch all branches from remote, do git fetch --all
. Then you can view all your branches via git branch
and checkout to them via git checkout -b [branch]
. Then you can simply view the files as you please from your remote using standard command line using ls
, cd
, cat
, etc. If you're really rebelious you can try Midnight Commander.
I recognise it might be slow pulling down large repositories over limited bandwidth (try pulling it through a VPS you SSH into?), but unfortunately there isn't much choice.
Upvotes: 1