Git
敲代码的哈士奇
这个作者很懒,什么都没留下…
展开
-
往Git仓库上传新项目
1、先在Git上创建一个代码库2、回到本地代码所在目录执行命令:git init3、添加README这个文件git add README.md4、这里是添加整个目录,也可以像git add README.md一样。添加单个文件//要注意后面的点(add后面有个空格)git add . 5、提交到本地代码仓库git commit -m "第一次提交代码"6、添加一个远程仓库git remote add origin https://xxxxxx..原创 2021-02-03 18:41:17 · 298 阅读 · 0 评论 -
git切换分支失败:error: pathspec ‘develop‘ did not match any file(s) known to git
现象使用命令切换到develop分支$ git checkout develop提示如下错误:error: pathspec 'develop' did not match any file(s) known to git解决1、先看一下git的分支情况$ git branch -a* master remotes/origin/master2、没有发现develop分支,则需要获取全部分支git fetch$ git fetchFrom https:原创 2021-02-03 16:50:00 · 5845 阅读 · 0 评论