教你如何将代码提交到github仓库

clone的方式

https://blog.csdn.net/zhang_jun_xiang/article/details/50372560

init方式

第一步

git init

git add .

Git remote add origin XXXX

git commit -m "init"

Git pull origin master

可能遇见错误

fatal: Couldn't find remote ref master

说白了就是这个项目还没有文件,空的,直接把本地修改的上传就可以了,不需要拉了

Git push -u origin master

可能遇见的错误:

fatal: The current branch master has no upstream branch.


To push the current branch and set the remote as upstream, use

    git push --set-upstream origin master


Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

解决办法:

https://www.cnblogs.com/sober-orange/p/git-token-push.html

其他Git 常用命令:

https://www.jianshu.com/p/acda1816a23e

查看远端仓库

删除远端仓库

修改远程仓库

https://jingyan.baidu.com/article/642c9d345b390b644b46f751.html


git remote -v git remote rm origin

git remote add origin [email protected]:JZMobile/MoocXuetang.git

git fetch

git push origin feature-new-dev

你可能感兴趣的:(教你如何将代码提交到github仓库)