What is the best way to “show” unfinished features (branches) by checking them out in another local repository? The usual way is to create an new local branch git checkout -b feature origin/feature.
But thinking about:
- Local branches on the target machine are only temporary needed, will be deleted for sure.
- Read-only access would be sufficient.
Is there any more elegant way to temporary checkout remote branches just to show them quickly?
You can check out remote branches right away, but you wont be able to commit, which is ok in this case since you only want to show work in progress. Just make sure you do git fetch first, so your references are up to date and then do e.g.
No need to create temporary branches for this.