Git 使用问题 - win7 git bash下git pull失败

简介: win7 旗舰版,从github上pull代码时,git bash命令出现错误Administrator@rust-PC /g/rust_proj/cardslib (master)$ git --versiongit version 2.

win7 旗舰版,从github上pull代码时,git bash命令出现错误

Administrator@rust-PC /g/rust_proj/cardslib (master)
$ git --version
git version 2.8.0.windows.1

Administrator@rust-PC /g/rust_proj/cardslib (master)
$ git pull https://github.com/gabrielemariotti/cardslib.git
fatal: I don't handle protocol 'https'

解决办法:

Administrator@rust-PC /g/rust_proj/cardslib (master)
$ git pull 'https://github.com/gabrielemariotti/cardslib.git'

git version 2.6.4.windows.1 下可使用双引号

故障原因:
参见: http://stackoverflow.com/questions/30474447/git-fatal-i-dont-handle-protocol-http
在 git clone 和 http://... 之间看起来是一个空格,但它实际上是一个特殊的Unicode字符
删去这个字符,输入真正的空格后,命令可以使用了。
真正的命令应该是这样的:

vi t.txt # copy+paste the line
python
open('t.txt').read()
git clone \xe2\x80\x8b\xe2\x80\x8bhttp://...
目录
相关文章
|
4月前
|
开发工具 git 开发者
Git Pull vs. Git Fetch:深度解析
【2月更文挑战第29天】
1286 0
Git Pull vs. Git Fetch:深度解析
|
4月前
|
开发工具 git 开发者
|
24天前
|
开发工具 git Python
通过Python脚本git pull 自动重试拉取代码
通过Python脚本git pull 自动重试拉取代码
130 5
|
15天前
|
开发工具 git 开发者
Git Fetch 和 Git Pull:理解两者的区别
【8月更文挑战第27天】
66 1
|
16天前
|
开发工具 git 开发者
Git进阶:超越pull与push,掌握这5条提效命令
【8月更文挑战第27天】在软件开发的世界里,Git作为版本控制的佼佼者,几乎成为了每位开发者的必备工具。然而,许多初学者甚至资深开发者在日常使用中,往往局限于git pull和git push这两个基础命令,忽略了Git强大的功能和灵活性。今天,我们就来探索五条能够显著提升你Git使用效率的进阶命令,让你的版本控制之路更加顺畅。
28 0
|
3月前
|
存储 开发工具 git
解决“hint: the same ref. If you want to integrate the remote changes, usehint: ‘git pull‘ before pus”
解决“hint: the same ref. If you want to integrate the remote changes, usehint: ‘git pull‘ before pus”
|
3月前
|
缓存 开发工具 数据安全/隐私保护
mac git命令行操作 git push pull 逻辑
mac git命令行操作 git push pull 逻辑
53 1
|
3月前
|
网络安全 开发工具 数据安全/隐私保护
git pull/push每次都需要输入密码问题
git pull/push每次都需要输入密码问题
63 0
|
4月前
|
开发工具 git
git pull之后出现REBASE(1/1)
git pull之后出现REBASE(1/1)
183 3
|
4月前
|
Shell 开发工具 git
【Github】git bash将本地工程上传至github
【Github】git bash将本地工程上传至github