![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Git
蓝染k9z
立志成为一个刷爆简单题的fw
展开
-
克隆指定分支的git操作
origin/template, origin是远程仓库名,template是远程仓库的一个分之,由上结果可以看出,远程仓库origin还有desktop、dev、gh-pages、template、master等分支。接下来,可以在本地新建分支并与远程仓库的分支进行关联了。-b 后方的 template 是新建文件夹的名字。原创 2022-09-15 09:04:40 · 194 阅读 · 0 评论 -
记录一些git命令
//代码合并,也就是先把自己当前的项目更新为仓库最新的,防止冲突,否则会被rejected git pull --rebase origin main //添加到临时区,备注,并上传 git add . git commit -m "提示信息" git push origin main //将新分支提交的改动合并到主分支上 git merge newbranch //删除分支 git branch -D newbranch //切换到main分支 git checkout -b main //查看原创 2022-01-09 13:46:52 · 61 阅读 · 0 评论 -
解决git clone 速度慢的问题
`1 在网站 https://www.ipaddress.com/ 分别搜索: github.global.ssl.fastly.net github.com 得到ip: 2 打开hosts文件 Windows上的hosts文件路径在C:\Windows\System32\drivers\etc\hosts Linux的hosts文件路径在:sudo gedit /etc/hosts 3,在hosts文件末尾添加两行(对应上面查到的ip) 199.232.69.194 github.global-ssl.f转载 2021-06-03 16:31:22 · 159 阅读 · 0 评论 -
Git 报错 OpenSSL SSL_read: Connection was reset, errno 10054
解决方法:输入 git config --global http.sslVerify "false" 即可原创 2021-04-22 23:17:49 · 198 阅读 · 2 评论 -
Git 的使用出现 Failed to connect to 127.0.0.1 port 1080: Connection refused
解决方法:我的电脑:users -> 当前用户 -> .gitconfig 文件 -> 删去 proxy 所在的一行原创 2021-04-22 23:16:07 · 262 阅读 · 1 评论 -
Git 提交更新到仓库中
Git上传项目变化原创 2020-08-10 11:42:45 · 199 阅读 · 0 评论 -
利用Git tag更新项目的版本
git tag 可查看在仓库中提交过的几个版本 不过需要在项目的文件夹内打开Git Bash git checkout 版本号 例如:git checkout v1.0,将会直接将当前本地的项目直接替换为指定的版本,运行截图如下:原创 2020-08-10 11:30:38 · 1256 阅读 · 0 评论