GITHub API Issue with file upload

I am trying to upload file to GitHub via GITHub API (http://developer.github.com/v3/repos/contents/). Somehow I am not able to upload file. When I tried to upload existing file it gave me message "{"message":"refs/heads/master expected to be at ee1cd720841a4b5b06a8339c333c56b1748e66f9","documentation_url":"http://developer.github.com/v3/repos/contents/"}". When I went to github and tried to delete file using website it gave me below error. I can do workaround with reset head to previous version and move on. But I am trying to understand what caused this behavior and how can I prevent same in future. Neither Google nor Github Help was able to answer me so looking for something from community. Thanks for looking into it. 在这里输入图像描述


As Ivan suggested, if we try to create/update files using quick succession using API it causes mentioned behavior. Till issue is fixed we can workaround this by making thread sleep between two request. I hope it will help someone.

链接地址: http://www.djcxy.com/p/75144.html

上一篇: 我可以在一组自定义项目上运行Visual Studio代码分析吗?

下一篇: GITHub API问题与文件上传