msysgit

Syntax error =~ operator in msysgit bash

对着背影说爱祢 提交于 2019-11-29 09:08:33
I'm trying to add a function to my bash_profile for msysgit : function git-unpushed { brinfo=$(git branch -v | grep git-branch-name) if [[ $brinfo =~ ("[ahead "([[:digit:]]*)]) ]] then echo "(${BASH_REMATCH[2]})" fi } But I get the following error: bash: conditional binary operator expected` bash: syntax error near =~' From what I can find, the "equals tilde" operator ( =~ ) evaluates as regex in bash. Why is =~ is throwing an error? UPDATE: Here's a screenshot of inputting it manually (this is running sh.exe): VonC Update 2015: msysgit is now obsolete. You should use the bash which comes with

msysgit bash shell- how to troubleshoot “cannot find command”

岁酱吖の 提交于 2019-11-29 08:04:53
I need help getting git extensions to run with msysgit. I have had bad luck with extensions git-tfs and git-fetchall, in both cases it is the same problem. The addon will require a file to be placed where git can find it (git-tfs.exe and git-fetchall.sh). I understand this to mean the files need to be in a directory that is in the 'PATH' environment variable. In both cases I get stuck at this point: $ git-diffall bash: git-diffall: command not found or: $ git-tfs bash: git-tfs: command not found When I run echo %PATH% from a regular command shell, it shows my path variable includes the

Passing windows slash (/) based parameters to a program from bash script

青春壹個敷衍的年華 提交于 2019-11-29 05:29:33
问题 I'm trying to run the following from my bash script. (bash installed via msysgit) taskkill /IM ssh-agent.exe The output I get on the screen from taskkill is: ERROR: Invalid argument/option - 'C:/Program Files/Git/IM'. Type "TASKKILL /?" for usage. The executible is running, but the /IM is being expanded regardless of what I try to do to escape it... I've tried using \/IM but then it sends \/IM without escaping the slash, I've tried a few different ways of running it through eval, cmd /c start

Can I use mSysGit and Cygwin's git?

吃可爱长大的小学妹 提交于 2019-11-29 04:14:28
After migrating to Windows, I'm using msysgit with its included bash shell, and that's working well for me. But I have issues: our ant build process won't run in that shell, I'd like to use Cygwin's xterms instead of the Windows command window, since the terminal compatibility isn't good enough to run everything else I'd like in that window, and so on. I've actually made a go of sticking with msysgit in the Windows command shell so that I don't have to use a separate window to build, but that's got even more problems: the lack of cd - and file completion is killing me, most of the commands I'd

Git push fails with “fatal: early EOF” when PUSHing but only on one file

淺唱寂寞╮ 提交于 2019-11-29 03:42:05
When I try adding textures and text files to my repo it all works, but when I try adding a .blend file I get this error. I've tried a bunch of things I found here and on google, none of them worked (all were for clone/pull commands) I'm using Tortoise git 1.7.8 and Git 1.7.10 msysgit - I changed to them after the latest builds failed. Others have no problem pushing things to the repo, but I did not send them the .blend file. Here is the output: Pushing to ssh://git@x.x.x:x/home/git/gitrepo Counting objects: 4, done. Compressing objects: 100% (3/3) Writing objects: 100% (3/3), 112.00 KiB | 116

.gitignore does not understand my folder wildcard on windows

谁都会走 提交于 2019-11-29 01:27:16
I'm encountering a weird issue with .gitignore on Windows. I want git to ignore all .exe files, except those in the Dependencies folder (and all subfolders). So I have: .gitignore : *.exe !/Dependencies/**/*.exe This, unfortunately, does not work. Meanwhile, this does: *.exe !/Dependencies/folder/subfolder/*.exe So I'm wondering, am I messing something up, or is this some kind of bug? I'm running msysgit on Windows (Windows 7 x64) version 1.6.5.1-preview20091022 Thanks in advance for any input :) Since git 1.8.2 (March, 8th 2013) , the ** is now supported: The patterns in .gitignore and

Git clone using ssh - can't find repository

倾然丶 夕夏残阳落幕 提交于 2019-11-28 23:53:10
I'm trying to setup a Git server on Windows 7, using CopSsh, PuTTY and msysgit. I'm having problems cloning a repository using ssh. If I use a regular directory path, it works: $ git clone ~/vc/git/depot/test.git/ /c/dev/es/app Initialized empty Git repository in c:/dev/es/app/.git/ warning: You appear to have cloned an empty repository. Ssh, doesn't work. I've tried an different paths without success. $ git clone ssh://steve@test:4837/~/vc/git/depot/test.git/ /c/dev/es/app Initialized empty Git repository in c:/dev/es/app/.git/ fatal: '~/vc/git/depot/eastApp.git' does not appear to be a git

Use Cygwin or msysGit version of Git, or both?

眉间皱痕 提交于 2019-11-28 21:08:30
问题 I am running Windows 7, I just installed Cygwin for the first time today so I have been playing around with it. I am now wanting to start using Git as well. From what I have read msysGit will allow you to use a GUI, and it also adds a right click on a folder/file Add to Git GUI and Add to GIT Bash context menu options. At the same time though I would like to use the command line to do some Git stuff but I think as a Git beginner it would be nice to have the context menus and a GUI. So I am

How do I run msysgit in cmder?

馋奶兔 提交于 2019-11-28 20:33:12
I was using msysgit and git-bash in cmder when I accidentally exited out of it. Now I can't seem to figure out how to get to the unix environment I previously had. Git bash is not recognized as a command. All I see is the typical command window prompt displaying the C:/User/.. rather than the $~User . How would you restore the git bash session? VonC You can type the full path of your msysgit intallation (2014, Git 1.9.z) to launch a bash session. For instance: "c:\prgs\git\PortableGit-1.9.0-preview20140217\Git Bash.vbs" : will open a new windows "c:\prgs\git\PortableGit-1.9.0-preview20140217

Difference between GNUWin32 and cygwin

流过昼夜 提交于 2019-11-28 20:10:42
问题 I can't seem to get a handle on the difference between the two. It seems that one ( GNUWin32 ) is an layer on top of windows (like MSYS ) and the other (cygwin) is something else (?) What does that mean? When would I use one over the other? Are they both suited for the same thing? I want to use it mainly for git but want to keep my options open for learning and doing all thing *nixy. Is there another tool for this? Will msysgit be better suited for this? Are there any resources that go