Tag: bash

/mingw32/libexec/git-core/git-sh-setup: 30: Syntax error: word unexpected (expecting “)”)

I’m running git bash (2.7.4) on windows 7, and cannot use certain Git commands (rebase/stash) for example. throwing an error: /mingw32/libexec/git-core/git-sh-setup: 30: Syntax error: word unexpected (expecting “)”) Other basic commands like pull and push work okay. Since upgrading from git 1.9 these commands fail. EDIT It may also be worth noting that git commands […]

gitattributes – how to identify bash script files with no extension

I’m just getting up to speed with using git. I’ve been using the examples in https://github.com/Danimoth/gitattributes to put together a gitattributes file for my various projects (mostly bash and python scripts). My problem is that most of my bash scripts have no file extension. Is there a pattern I can use to explicitly select these […]

Non-Terminating Process Git Bash (C#)

As a fun little project, I am trying to use C# to operate the bash.exe provided by Git. I want the process to behave just as if I ran it in the Git Bash Application. By this, I mean I want to be able to execute command and get the output of said commands (i.e. […]

git create remote branch only (without local)

This question already has an answer here: How to create a remote Git branch without creating a local branch? 1 answer

Commands working on windows command line but not in Git Bash terminal

I am trying to run certain commands in Git Bash but they continue to hang and not display anything. When I run them in the Windows command prompt they work. For example, in my windows command prompt the Microsoft Windows [Version 10.0.10586] (c) 2015 Microsoft Corporation. All rights reserved. C:\Users\danie>python.exe Python 2.7.11 |Anaconda 4.0.0 (64-bit)| […]

Alias for submodules

Was were using SVN prior and I have searched around but we use submodules differently I believe. At least when we branch. When we branch we want the submodules branched off as well as they are used in other applications, so I currently have two easy aliases. sclone = “!f() { branch=${1}; git checkout -b […]

How to reliably check whether a file is ignored by git?

I’m encountering a problem where git check-ignore is not respecting .gitignore‘s ‘not’ (!) rules. It’s returning “Ignored” if a file matches any entry in the .gitignore file, regardless of whether that entry is telling it to not ignore the path (via the ! operator) git check-ignore‘s documentation states the return codes map as follows: EXIT […]

How to listen to webhooks from bash script?

I want to listen to webhook from GitHub and launch a bash script (git pull) on any new commit. I don’t want to use python or nodejs only bash script. Is it possible? I believe that netcat can do it. I don’t need to parse the request. Only listen to specific port, and if someone […]

What is the difference in command line argument syntax between bat and sh?

I am trying to run robocopy (Windows robust copy) in a shell script (which is actually a git hook). It works fine until I add the option /XO. So the command: robocopy source destination a.txt works correctly in .bat and .sh file. But the command robocopy source destination a.txt /XO fails in .sh with error: […]

How to authenticate LDAP connection on Git (gogs)?

I’m trying to set up a Git server on my company virtual server using http://gogs.io git service. They have the set-up for LDAP connection but there are no way to test the authentication. Or is that any command that I could use in the git bash that could help to connect with the AD server? […]

Git Baby is a git and github fan, let's start git clone.