简体   繁体   English

无法从本地存储库推送到 github 存储库

[英]Can not Push to github repository form local repository

I am trying to push my local project ot my remote repository.我正在尝试将我的本地项目推送到我的远程存储库。 but while i put the $git push -u origin master its not working但是虽然我把$git push -u origin master放在了它不工作在此处输入图片说明

Its stuck here for long time.卡在这里很久了。

what i am missing here ?我在这里缺少什么?

a workaround i tend to use is going to a difrent folder and do我倾向于使用的解决方法是转到不同的文件夹并执行

git clone (url here)

then copy the projct files to the folder it made then add the files with然后将项目文件复制到它创建的文件夹中,然后添加文件

git add (files)

and commtit with并承诺

git commit -m "message"

and push with并推动

git push -f

(idk why the -f but a frend of mine told me to do it so ive done i scince) (我知道为什么 -f 但我的一个朋友告诉我这样做,所以我已经做到了)

  1. add remote $git remote add origin <Your remote repository> and create branch $git branch -m master添加远程$git remote add origin <Your remote repository>并创建分支$git branch -m master
  2. you must add your files $git add .你必须添加你的文件$git add . then然后
  3. push to te remote repository $git push -u origin master推送到远程仓库$git push -u origin master
  1. add remote and create branch添加远程并创建分支
  2. you must add your files $git add .你必须添加你的文件$git add . then然后
  3. push to te remote repository推送到远程仓库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM