我有一个名为my_pcc_branch.patch的补丁.
当我尝试应用它时,我得到以下消息:
$ git apply --check my_pcc_branch.patch
warning: src/main/java/.../AbstractedPanel.java has type 100644, expected 100755
error: patch failed: src/main/java/.../AbstractedPanel.java:13
error: src/main/java/.../AbstractedPanel.java: patch does not apply
Run Code Online (Sandbox Code Playgroud)
这是什么意思?
我该如何解决这个问题?
最近我一直无法克隆或推送到github,我正试图找到根本原因.
这是在Windows上
我有cygwin + git以及msysgit.
使用以下选项安装Msysgit:
这给了我4个环境来尝试使用git:
不知何故,我设法让自己进入一个位置,当我尝试使用msysgit,cmd.exe或Powershell克隆存储库时,我收到以下错误:
> Initialized empty Git repository in
> C:/sandbox/SomeProject/.git/
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> Permissions 0644 for
> '/c/Users/Ben/.ssh/id_rsa' are too
> open. It is recommended that your
> private key files are NOT accessible
> by others. This private key will be
> ignored. bad permissions: ignore key:
> /c/Users/Ben/.ssh/id_rsa Permission
> denied (publickey). fatal: The …Run Code Online (Sandbox Code Playgroud) 我用Google搜索并找到了许多解决方案,但对我来说都没有用.
我试图通过连接到LAN网络中的远程服务器从一台计算机克隆.
从另一台计算机运行此命令会导致错误.
但是在服务器上使用git://192.168.8.5运行SAME clone命令它没关系并且成功.
有任何想法吗 ?
user@USER ~
$ git clone -v git://192.168.8.5/butterfly025.git
Cloning into 'butterfly025'...
remote: Counting objects: 4846, done.
remote: Compressing objects: 100% (3256/3256), done.
fatal: read error: Invalid argument, 255.05 MiB | 1.35 MiB/s
fatal: early EOF
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)
我已添加此配置,.gitconfig但也没有帮助.
使用git版本1.8.5.2.msysgit.0
[core]
compression = -1
Run Code Online (Sandbox Code Playgroud) 我在Windows上使用git.我安装了msysgit包.我的测试存储库在服务器上有一个自签名证书.我可以使用http访问和使用存储库而不会出现问题.移至https会出现错误"SSL证书问题:无法获取本地颁发者证书".
我在Windows 7客户端计算机的受信任的根证书颁发机构中安装了自签名证书.我可以浏览到Internet Explorer中的https存储库URL,没有错误消息.
本博客http://blogs.msdn.com/b/phkelley/archive/2014/01/20/adding-a-corporate-or-self-signed-certificate-authority-to-git-exe-s-store. aspx解释说curl不使用客户机的证书存储区.我按照博客文章的建议创建了curl-ca-bundle.crt的私有副本,并配置git来使用它.我确信git正在使用我的副本.如果我重命名副本; git抱怨文件丢失了.
我粘贴在我的证书中,如博客文章中所述,我仍然收到"无法获得本地颁发者证书"的消息.
我通过https克隆了一个GitHub存储库,验证了git仍在工作.
我唯一看到的与博客文章不同的是我的证书是根证书 - 没有链条可以达到它.我的证书最初来自于单击IIS8 IIS管理器链接"创建自签名证书".也许这使得证书在某种程度上与curl期望的不同.
如何获得git/curl接受自签名证书?
如何在msysgit中使用Notepad ++(或除vim之外的任何其他编辑器)?
我尝试了以下所有方面无济于事:
git config --global core.editor C:\Program Files\Notepad++\notepad++.exe
git config --global core.editor "C:\Program Files\Notepad++\notepad++.exe"
git config --global core.editor C:/Program Files/Notepad++/notepad++.exe
git config --global core.editor C:\\Program Files\\Notepad++\\notepad++.exe
Run Code Online (Sandbox Code Playgroud) 我的朋友和我正在尝试使用Git Server:Gitosis和Cygwin在Windows上设置Git for Windows,但我们只是遇到了问题.
使用msysgit的 Windows"Setup Git Server"指南会是什么样的?
上面的教程中有一条评论暗示无法用msysgit完成,因为gitosis需要使用SSH服务器和Bash?什么是分步指南(因为没有可用的指南)?
安装mysisgit
?
I managed to create a little mess in my local git repository. I was trying to fix a broken commit by using the following instructions. Before running the "git commit --amend" (and after the git rebase --interactive) I decided that my changes were incorrect and so I executed "git reset HEAD --hard". Not a good idea, I tell you.
现在,交互式基础似乎被"卡住了".Git将当前分支显示为(| REBASE-m).我的存储库中的每个命令(cd ..,ls,git rebase ...)都会出现以下错误:
cat:.git/rebase-merge/head-name:没有这样的文件或目录
以下是git rebase --abort的样子:
$ git rebase --abort
cat: c:/_work/project/src/git/.git/rebase-merge/quiet: No such file or directory …Run Code Online (Sandbox Code Playgroud) 我甚至不确定我是在问正确的问题.让我解释一下我的情况:
这是关于Windows 7上的Git.
我的公司在网络驱动器上设置Windows用户目录,而不是在本地硬盘驱动器上(用于备份和超出此问题范围的其他目的).我不能改变这个政策.
我可以在该方案之外拥有本地文件,这就是我的Apache服务器的设置方式.完全是当地的.
我安装了Git.它安装了Bash.当我启动Bash和cd ~(更改到根目录)时,我发现它(Bash根目录)指向我的网络用户目录.我希望它不要那样做.我想要 ~在我的硬盘上的其他地方.我想要它,以便当我执行其他操作,如安装证书,SSH密钥等时,其默认值不会自动使用该网络目录.
我到处搜索都是徒劳的,我能找到的所有内容都指的是涉及别名,重定向和$ HOME指向的位置的答案.但这根本不是我想要的.
问题是:我可以更改该目录吗?如果是这样的话:怎么样?
更新:所以,$ HOME是我需要修改的.但是我一直无法找到这个神秘的$ HOME变量的位置,所以我认为它是一个Linux系统版本的PATH或其他东西.无论如何 ......
我的确有一个"个人资料"文件git/etc.以下是内容(注意没有$ HOME):
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see …Run Code Online (Sandbox Code Playgroud) 我在Windows上使用msysgit 1.7.7.1.使用时出错git diff.是什么造成的?msysgit中是否包含差异工具?我该怎么办?
警告:终端功能不全
我无法确定msysGit和Git for Windows之间的区别.他们有什么不同?为什么我会选择一个而不是另一个?