当前位置:   article > 正文

解决idea / pycharm 通过git push代码被拒绝的问题_pycharm push rejected的解决

pycharm push rejected的解决

Push rejected: Push to origin/master was rejected

有很多解决方案介绍:
在项目目录下运行命令:
git pull
git pull origin master

但是运行命令时又出错:
git pull“No remote repository specified”

这时需要更改本地项目仓库目录下.git 中的config配置文件:
修改“.git”文件夹里面的“config”文件的url就可以了:

[core]

    repositoryformatversion = 0

    filemode = true

    bare = false

    logallrefupdates = true

    ignorecase = true

    precomposeunicode = false
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

[remote “origin”]

    url = https://github.com/checkfrank/checkfrank.github.io.git

    fetch = +refs/heads/*:refs/remotes/origin/*

    pushurl = https://github.com/checkfrank/checkfrank.github.io.git
  • 1
  • 2
  • 3
  • 4
  • 5

[branch “master”]

    remote = origin

    merge = refs/heads/master
  • 1
  • 2
  • 3

把其中下面两项换成你的项目地址就可以了:

url = https://github.com/xxx/xxx.git

pushurl = https://github.com/xxx/xxx.git

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/767990
推荐阅读
相关标签
  

闽ICP备14008679号