Interview Prep/Git & GitHub/Conflicts, remotes, fetch, pull and push

What are `git ls-remote` and `git remote show origin` good for?

IntermediateConceptConflicts, remotes, fetch, pull and push
Answer

<details> <summary><b>Answer</b></summary>

ls-remote lists refs on a remote without cloning, useful to check a tag or branch SHA in scripts. remote show prints tracking relationships, stale branches and what push/pull would do.

git ls-remote --tags origin 'v1.*'
git ls-remote origin refs/heads/main
All Git & GitHub questions Roadmap: Git & GitHub

More on Conflicts, remotes, fetch, pull and push