第一:如何创建空分支 git checkout --orphan test_i235git rm -rf .清空目录echo "README" > READMEgit add .git commit
第一:如何创建空分支
git checkout --orphan test_i235git rm -rf .清空目录echo "README" > READMEgit add .git commit -m 'add readme file'git push -u origin test_i235
第二:报错一
error: RPC failed; result=22, HTTP code = 4135 MiB/s fatal: The remote end hung up unexpectedlyWriting objects: 100% (72/72), 31.35 MiB | 1.25 MiB/s, done.Total 72 (delta 22), reused 0 (delta 0)fatal: The remote end hung up unexpectedlyEverything up-to-date
原因:
If you get error 413, then the issue doesn't lie with git but with your web server. It's your web server that is blocking big upload files.Solution for nginxJust load your nginx.conf and add client_max_body_size 50m; ( changing the value to your needs ) in the http block.Reload nginx to accept the new config by executing sudo service nginx reload and try again to push your commit over http.Solution for ApacheIn your httpd.conf add LimitRequestBody 52428800 ( changing the value to your needs ) inside a <Directory /> block. Doing this you can limit the request of the whole server filesystem, just a single Virtual Host or a directory.I hope this helps.
http://stackoverflow.com/questions/7489813/github-push-error-rpc-failed-result-22-http-code-413
第二:报错二
Access denied.fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.原因:工程配置的公钥只能pull和clone,而用户配置的公钥可以push
第三: 将conflict恢复之前
git reset --merge