github如何上传自己的项目(图文介绍)
以图文的方式介绍如何在GitHub上传自己的代码,包含一些常见问题的介绍
-
创建新项目

-
添加项目名称并确定

-
下面的链接保存

-
选中需要上传的文件夹=>右键open git bash here

-
git init初始化,这里会生成一个.git文件,如果打开没有,点击查看,勾选隐藏的项目
-
git add .进行添加,git status查看状态
-
git commit -m "first commit"这里提交会不成功,如果是第一次可能需要输入git config --global user.name "your name"和git config --global user.email "your email"
-
复制步骤3的链接然后运行如下代码
git remote add origin https://github.com/........

9. 最后运行git push -u origin master第一次运行需要输入github密码,按提示输入就行
添加成功
可能的问题:
- warning: in the working copy of ‘ppocr_keys_v1.txt’, LF will be replaced by CRLF the next time Git touches it
解决方法:输入git config --global core.autocrlf inputHow to Deal with the Git Warning: LF will be Replaced by CRLF
2. fatal: remote origin already exists报错window就是步骤三复制链接有问题或者想要替换时如何删除之前错误的地址
解决方法:remote origin already exists远程分支已经存在,故报错!git remote rm origin然后重新添加正确的分支git remote add origin xxx
更多推荐
所有评论(0)