Following the pull example and doing a simple fast-forward pull you'll get the inverse of what was changed in your working directory. ## Repo Steps 1) Checkout out the [pull-example-dirty-index](https://github.com/nodegit/nodegit/tree/pull-example-dirty-index) branch 2) `npm install && ./test.sh && cd downstream && git status` 3) Notice that there is 1 deletion. I.e. the index isn't properly updated. Doing a `nodegit.Checkout.head` doesn't update the index either. [Possibly related pygit2 stack overflow question](http://stackoverflow.com/questions/27749418/implementing-pull-with-pygit2) Originally reported by @ubercow
Activity
johnhaley81 commentedon Mar 2, 2015
We should rebase this branch on master now to see if it still performs the same way.
dennari commentedon Mar 19, 2015
Doing
after
mergeBranchesupdates the index.Obviously this might result in losing stuff.
For some reason
STRATEGY.SAFEdoesn't seem to cut it.johnhaley81 commentedon Mar 19, 2015
Relevant references:
checkout options
checkout notify
checkout strategy
mkliu commentedon Apr 18, 2015
I was trying #151 and https://github.com/nodegit/nodegit/blob/f80e085e3118bbd6aad49dad7c53bdc37088bf9b/example/fetch.js. The remote isn't working.
johnhaley81 commentedon Apr 20, 2015
That example is almost 2 years old and has been updated since then as the API has changed.
Try https://github.com/nodegit/nodegit/blob/1eaf5bc03728cf4cf4f8df5e84251ff81dc03f8a/examples/fetch.js
johnhaley81 commentedon Apr 20, 2015
This was updated in #505