Git Extensions:一切都很好,直到昨天.
但突然间,当我尝试使用某些存储库时,我会收到此错误 git extensions
C:\Program Files\Git\bin\git.exe pull --progress "origin"
Done
0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x68560000, RegionSize 0x390000, State 0x10000
C:\Program Files\Git\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0
Run Code Online (Sandbox Code Playgroud)
我克隆的所有存储库都在发生这种情况.但是,我的git bash工作正常.我不知道发生了什么.知道为什么会这样吗?
--preserve-merges
Instead of ignoring merges, try to recreate them.
This uses the --interactive machinery internally, but combining it
with the --interactive option explicitly is generally not a good idea
unless you know what you are doing (see BUGS below).
Run Code Online (Sandbox Code Playgroud)
那么当你使用时会发生什么--preserve-merges?它与默认行为(没有该标志)有何不同?"重新创建"合并等意味着什么?
在谈到GIT时,我是一个完整的Noob.过去几天我一直在迈出第一步.我在我的笔记本电脑上设置了一个repo,从一个SVN项目中拉下了Trunk(有一些分支问题,没有让它们工作),但一切似乎都没问题.
我现在希望能够从笔记本电脑拉到或推送到我的主桌面.原因是笔记本电脑在火车上很方便,因为我每天花2个小时旅行,可以完成一些好的工作.但我家里的主机非常适合开发.因此,当我回到家时,我希望能够从笔记本电脑推/拉到主计算机.我认为最简单的方法是让局域网中的代码文件夹共享,并执行:
git clone file://192.168.10.51/code
Run Code Online (Sandbox Code Playgroud)
不幸的是,这似乎对我不起作用:
所以我打开一个git bash cmd并输入上面的命令,我在C:\ code(两台机器的共享文件夹)这是我得到的:
Initialized empty Git repository in C:/code/code/.git/
fatal: 'C:/Program Files (x86)/Git/code' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
如何以最简单的方式在两台机器之间共享存储库.
将有其他位置将是官方存储点和其他开发人员和CI服务器等将从中拉出的位置,这样我就可以在两台计算机上处理相同的存储库.
根据塞巴斯蒂安的建议,我得到以下内容:
C:\code>git clone --no-hardlinks file://192.168.10.51/code
Initialized empty Git repository in C:/code/code/.git/
fatal: 'C:/Program Files (x86)/Git/code' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
**编辑 - 答案**
感谢所有帮助.我尝试映射一个驱动器,这工作所以我想回去重试没有映射.最终结果是:
git clone file://\\\\192.168.0.51\code
Run Code Online (Sandbox Code Playgroud)
这很有效.
谢谢
How can I move a directory and files to a sub-directory along with commit history?
For example:
Source directory structure: [project]/x/[files & sub-dirs]
Target directory structure: [project]/x/p/q/[files & sub-dirs]
传统上,MSYS bash被认为不如Cygwin bash.前者是MinGW内部用于运行autoconf脚本的辅助工具.但现在有MinGW-w64和MSYS2.后者附带了像包管理器这样的甜蜜的pacman和像zsh这样的优雅shell,所以我想知道仿真层是否还有差距.
虽然MinGW*应用程序是Windows本机可执行文件,但MSYS2软件需要POSIX仿真层,就像Cygwin一样.至少对于一个随意的用户来说,很难发现两者之间的差异.
我在Windows上使用" git bash" - git通过集成用于Windows bash.显然它使用了MINGW/MSYS支撑.(更新自@VonC:它现在使用msys2,因为自2015年第四季度以来msysgit已经过时.)
所以已经安装了很多MSYS工具 - 从.awk到zcat.但是我错过了man命令并将zip多个文件压缩成zip文件(unzip存在!).
从哪里可以安装它们?我不想安装MINGW系统的另一个副本!任何方式只是为安装添加一些预编译工具git bash?
我在github上阅读wiki for git,它说msys2捆绑了pacman:https://github.com/git-for-windows/git/wiki/Package-management
但是当我调用它时:
$ pacman
bash: pacman: command not found
Run Code Online (Sandbox Code Playgroud)
有谁知道发生了什么?这个wiki指的是哪个git版本?有没有办法在Git for windows中为msys2安装额外的软件包?
我最近开始使用Cygwin用于其他目的,并且已经在我的PC上安装了Git.我知道我可以运行可执行文件并将Git安装到Cygwin中,但是因为我已经安装了它,所以我希望Cygwin只使用我的Windows安装.我曾尝试研究如何以各种方式重定向路径,但没有成功,有人可以帮助我吗?
为了能够在Windows上运行我的跨平台应用程序的测试脚本,我安装了MSYS2并使用pacman来安装我的测试脚本所依赖的任何软件包.
由于MSYS2提供了一个git(msys/git)端口,我认为也不需要为Windows安装Git.但是MSYS2存储库中提供的git版本与Git for Windows提供的版本有什么区别?
到目前为止我注意到了这些差异
msys/git pip freeze在virtualenv上运行时将失败,其中在开发模式下安装了git clone的Python包:
FileNotFoundError: [WinError 3] The system cannot find the path specified: '/c/users/user/documents/project/.git\\..'
Run Code Online (Sandbox Code Playgroud)
git-for-windows/mingw-w64-x86_64-git不会失败,因此在路径处理方面至少存在一些差异.
Git for Windows的gitk和git gui开箱即用.没有必要像这里描述的那样设置GIT_GUI_LIB_DIR环境变量.
看来Git for Windows存储库中的git提供了最佳体验.
PS您可以通过添加以下为在MSYS2的Windows的混帐混帐安装/etc/pacman.conf,以上的[mingw32], [mingw64]和[msys]条目.但是安装Git for Windows SDK可能是一个更好的主意,它基本上是MSYS2的特殊版本,包括Git for Windows.否则,此处还描述了以下过程(以及更多).
[git-for-windows]
Server = https://dl.bintray.com/$repo/pacman/$arch
[git-for-windows-mingw32]
Server = https://dl.bintray.com/git-for-windows/pacman/i686
Run Code Online (Sandbox Code Playgroud)
在此之后(也许是一个pacman -Sy),您可以安装Git for Windows的git:
pacman -S mingw-w64-x86_64-git
Run Code Online (Sandbox Code Playgroud)
我想没有理由不在MSYS2中安装Git for Windows的git?
编辑 Git for Windows(联合国)安装程序遗留下来C:\ProgramData\Git\config …