memoryfolder

メモです

how to checkout to a specific pull request

I wanted to use yet-to-be-merged pull request of qutip, and googled to find this page, but the command shown there do not do what I want.

blog.scottlowe.org

after some search, I could get the code I wanted as a new branch 'stochastic' by:

C:\code\qutip>git fetch origin pull/815/head:stochastic
From https://github.com/qutip/qutip
 * [new ref]           refs/pull/815/head -> stochastic

C:\code\qutip>git branch
* master
  stochastic

C:\code\qutip>git checkout stochastic
Switched to branch 'stochastic'

branch name 'stochastic' is specified after head: in the first command, and this is something I chosen (you can choose whatever you want).
Now I can try out stochastic schrodinger equation with time-dependent hamiltonian!