Let’s suppose someone just sent a PR (Pull Request) to NuttX at github and you want to test it before it get merged.
Example, we want to test this PR: https://github.com/apache/incubator-nuttx/pull/1234
Then we do:
git fetch upstream pull/1234/head
git checkout FETCH_HEAD
And proceed with normal compilation.