Questions tagged [git-bash]

Git Bash is a bash shell bundled with Git for Windows that enables use of Git from the command line.

Git for Windows provides a Bash emulation environment used to run Git and a small set of Unix tools from the command line.

2696 questions
1
vote
1 answer

Git sed.exe uname.exe problems

I just Installed Git 1.8.5.2 My OS - Windows 7 home premium Everytime I open Git Bash. It show me the following error messages sed.exe has stopped working. uname.exe has stopped working. Anyone having this issue? How to fix it? This happened after…
user2734550
  • 813
  • 8
  • 27
1
vote
1 answer

What does typing "cmd" in Git Bash do?

I am new to Git and have been following the tutorials on the git-scm website I typed cmd into the input line in Git Bash and all the colours are gone and it looks like the normal command prompt. When I typed the input git status, it does return with…
dayuloli
  • 13,791
  • 13
  • 58
  • 103
1
vote
0 answers

excel shell command launching a bash script fails

I have a simple shell script that returns a file. Shell ("c:\cygwin64\bin\bash --login '/cygdrive/c/cygwin64/home/me/bin/sp2 '" & Parm1) This fails as a shell command but works when sent via command line Is there anyway I can keep the cmd window…
C0ppert0p
  • 629
  • 2
  • 7
  • 20
1
vote
2 answers

git alias for creating a .gitattributes on init - how do I add the new lines?

My latest iteration jinit= !git init && printf "* text=auto\n*.java text\n*.jsp text\n*.css text\n*.html text\n*.js text\n*.xml text\n*.sql text\n*.MF text\n*.tld text\n*.md text\n\n# git files\n*.gitignore text\n*.gitattributes text\n\n# eclipse…
Mr_and_Mrs_D
  • 27,070
  • 30
  • 156
  • 325
1
vote
2 answers

/p cmd option is resolved as a drive letter in git-bash

I used to call this command to popup a simple balloon message when gradle build is complete. It had worked fine on cygwin's bash. notifu /p "Gradle build complete" /m "Now you can take a look at the results" /d 0 > /dev/null However, after…
astronaut
  • 550
  • 1
  • 5
  • 17
1
vote
1 answer

In bash, can I pass an array as args of a function (as xargs does)?

I am using a bash script to generate a list of files, where each file name might contain spaces (it is on Windows, with Git Bash, and I need something that works with Bash 3). The script does roughly that: _my_function() { for i; do echo $i …
NoDataFound
  • 9,100
  • 27
  • 52
1
vote
1 answer

gem command not found through git bash

I'm new to git and I've been setting up a jekyll blog through my github account. I'm using the git bash command line. In the instructions one of the commands is: $ gem install jekyll When I run this it tells me: sh.exe": gem: command not…
intA
  • 2,131
  • 10
  • 34
  • 50
1
vote
1 answer

Windows Git bash prompt not displaying colours from a function

I'm using the following colour codes/function (pinched from Paul Irish) in my .bash_prompt, to display branch name and status in Git bash on windows.…
Raskolnik
  • 481
  • 3
  • 11
1
vote
1 answer

Is there a bash version 3.2+ for windows - or how to do regex in 3.1?

I'm using MINGW32 on Windows 7. Unfortunately, it comes with bash version 3.1, so when I try to do something in a shell script like if [ $x =~ $y ] where $y is a regex, I get the message "conditional binary operator expected" near `=~' Is there a…
JAyenGreen
  • 1,159
  • 2
  • 10
  • 19
1
vote
1 answer

automatic Suggestions for Checking out/seeing diffs for files modified

I have a big project, in which while working on any feature, I could be making edits to 6-8 files, each in turn nested some 6-10 levels. (Currently I copy paste the whole filepath using ctrl+shift+c, ctrl+shift+v, but it can get frustrating when…
Anshul Goyal
  • 61,070
  • 31
  • 133
  • 163
1
vote
1 answer

Git hook: add a new file to repo if a new branch is created

I am writing a git hook which checks if a new branch is created, and if so then add some predefined files to the repo for that new branch(Some config files). However because the branch is actually in the process of being created, my logic…
aqs
  • 5,182
  • 3
  • 22
  • 24
1
vote
2 answers

GitBash on the MAC

I am trying to follow Set up SSH for Gi. it goes on about opening GitBash but is this something else to terminal? As i follow this within the mac terminal and i get most of it but the ending as it does not work so i think its GitBash i need and not…
Simon Davies
  • 3,574
  • 8
  • 37
  • 67
1
vote
0 answers

git bash npm error

I'm using Win 7, 64 bit. in Git Bash command when i write npm it could return error. I uninstall/install check it. But nothing changed. I couldnt find a solution. In node command it is working. $ npm c:\Program…
Yilmazerhakan
  • 1,460
  • 1
  • 12
  • 19
1
vote
2 answers

git alias with bash conditional logic comparing strings - syntax issues

I'm working on a git alias and have run into syntax issues at its current (incomplete) state: [alias] gup2 = !git checkout $1 && BEFORE=$(git stash list) && git stash save gup-temporary-stash && git fetch && git rebase -p origin/$1 && if [ "$BEFORE"…
joelmdev
  • 9,449
  • 8
  • 57
  • 82
1
vote
3 answers

gitbash error -- sh.exe SSH_ENV ambiguous redirect

I have setup a account in bitbucket. As per the steps given here, https://confluence.atlassian.com/display/BITBUCKET/Set+up+SSH+for+Git In step 6.5, when I reopen the gitbash, it gives following error, Welcome to Git (version…
Vijay C
  • 4,459
  • 1
  • 39
  • 46
1 2 3
99
100