FAQ Database Discussion Community


sh.exe has stopped working on windows 8

git,git-bash
When I type git from command line all is working fine. But When I try to run Git Bash, I'm getting error sh.exe has stopped working Details: Problem signature: Problem Event Name: BEX Application Name: sh.exe Application Version: 0.0.0.0 Application Timestamp: 550b4e9e Fault Module Name: StackHash_5861 Fault Module Version: 0.0.0.0...

Get data from columnized data with bash

bash,git-bash
i a have set of git data from a script: objects=`git verify-pack -v .git/objects/pack/pack-*.idx | grep -v chain | sort -k3nr | head` echo "All sizes are in kB's. The pack column is the size of the object, compressed, inside the pack file." output="size,pack,SHA,location" for y in $objects do #...

Parsing the text that sets colors in a bash shell

linux,git-bash
Could someone either point me to some documentation on the web that would explain how a bash shell would pars the following lines that sets up colors or explain from the parsers view, how the following lines would be read? I know that 32 cause dark green to be displayed...

Git Bash Script Check Working Tree

bash,git-bash
Is there a way in Git Bash to check if the working tree is clean, that is no uncommitted changes or untracked files? I'm working on a bash script for my group to automate the process of daily rebasing working branches. Unclean working trees is a common problem. I can...

make bash completion reset on branch switch

git,bash,git-bash,bash-completion
I have the following problem: I have set up that the branch I currently reside in, is shown in my command prompt like this: "[Current_working_dir] (master)" however every time I switch branch I get the following error and the branch isn't refreshed: [work_environment] (master) git checkout test M bash/bashrc Switched...

Using parentheses in bash commands, git mv

bash,git-bash
Trying to rename a file using parentheses but I keep hitting this error and can't find any docs around it: -bash: syntax error near unexpected token `(' I'm doing something like: git mv title_1.1 title_(1.1) ...

How to link GitHub repository with Wamp Server correctly?

wamp,git-bash,github-for-windows
Anyone know how to link a local Github repo with the Wamp server? I'm trying to run my project with localhost so I'm using Wamp. Whenever I run these commands cd C:\Users\my\Documents\GitHub\repo git --work-tree=C:\wamp\www status (repo is the name of the repo) to link them up though (as suggested by...

Stupid GIT GUI questions

c#,windows,git-bash,git-gui,git-revert
I feel really stupid right now. I have used a number of version control apps but not git that much. I have read lots of posts, but am more confused than ever as many of the (apparently correct) answers use the command prompt and assumptions that I understand GIT much...

gitlab: Windows: How to use chmod and fix “Get Permission denied (publickey). fatal: Could not read from remote repository”

git,bash,gitlab,git-bash
I have gone through many other posts about the above error, but they all seem to be for a different OS, or for some different reason. I am running Windows 8.1. I have git installed (I am very new to git), and have signed up to gitlab, create a project...

Msysgit git Bash change of behavior on autocomplete

autocomplete,msysgit,git-bash
Up to 1.9.4 git Bash, on hitting tab, would auto-complete up to ambiguity and then let me complete the rest (for branches, tags etc). As of 1.9.5 (version 1.9.5-preview20141217) it will present me with a list of the possible branches/tags etc and let me choose. I much preferred the previous...

List all git local branches that start with string

bash,shell,unix,git-bash
I want to list all local branches (eventually delete but for safety's sake...) that ONLY begin with abc. The thing is that this kind of works. But if no branch starts with "abc" then it lists ALL of the branches. which is what I don't want to end up doing...

$HOMEPATH + \ not working in GitBash

bash,shell,scripting,git-bash
I'm trying to create a script that can be used by all by all users. I am using GitBash on a Windows 7 machine and the line which I am trying to automate is alias proxyon="source $HOMEPATH/.proxy/proxy-switch.sh Now the issue with this is, echo &HOMEPATH \Users\<username> GitBash, when executing removes...

How to pragmatically check with bash script if a branch in git needs to be rebased?

git,bash,rebase,git-rebase,git-bash
I'm working on a bash script for my team to enforce regular rebasing of working branches. The problem I am facing at the moment is how to determine whether a branch is behind master and/or if it needs to be rebased, rather than blindly attempting to rebase the branch. Here...

Continuing shell script execution after SSHing into guest machine?

bash,shell,virtualbox,git-bash
I have an Ubuntu guest box setup on my Windows host using Vagrant and VirtualBox. I'm trying to write a shell script that will... vagrant up vagrant ssh once vagrant up is complete cd into a specific project directory in the guest machine once successfully SSHed into the guest machine...

Get a list of all commits that is ordered by date (including dangling commits)

windows,git,git-bash
How can I get a list of absolutely everything that can be reached that is ordered by date? Normal commits, stashes, dropped stashes, commits from deleted branches - everything that hasn't been vacuumed yet. I'm asking because I need to find a particular commit (or stash) and I don't remember...

Git bash uses wrong python, other solutions don't work

python,git,git-bash
I've seen a couple solution so far but they don't work. I'm trying to run (in git bash, on windows) bash scripts/test.sh But it's supposed to use Python27, and I have that, and Python34. when I type python --version, it tells me it's using Python34. I tried doing PATH=$PATH:/c/Python27/ But...

Git .bash_profile Not Working With the Right-click

git,bash,git-bash,.bash-profile
My .bash_profile is not working whenever I right click to a folder and click Git Bash. It works perfectly fine when I open Git Bash with its desktop icon. Here's my .bash_profile: source ~/git-completion.bash green="\[\033[0;32m\]" blue="\[\033[0;34m\]" purple="\[\033[0;35m\]" reset="\[\033[0m\]" source ~/git-prompt.sh export GIT_PS1_SHOWDIRTYSTATE=1 export PS1="$green\u$green\$(__git_ps1)$blue \w $ $reset" I tried searching...

Executing git-hooks on windows errors out

regex,windows,git,githooks,git-bash
So, I have written a simple git-hooks for pre-push which works just fine on Linux or Mac, but doesn't work on Windows. Script: Tries to match the commit message with a regular expression, and should return 0 if matches or else exit. Based on the articles I read, they say...

Git for Windows equivalent for open current directory command

git,shell,command-line-interface,git-bash
I am using the Git for Windows "git bash" command line on Windows and can't seem to find an equivalent in it for the open current directory command "cmd ." I can't find any documentation but if someone can point me to a list of commands for Git for Windows...

How to remove a file beginning with a dash (in Unix like mode) [duplicate]

linux,unix,escaping,git-bash,rm
This question already has an answer here: How do I deal with a filename that starts with the hyphen (-) character? 4 answers I have accidentally created a file in GitBash (a Unix like environment) with the name - -l (I have absolutely no idea how I managed to...

Git bash store GITHUB credentials Windows

git,github,jenkins,git-bash
I am trying to set up a jenkins windows slave which will pull from GITHub using git bash. I have installed git bash on my windows server so it is available through the windows command prompt. When I try to invoke any git command that goes to github it always...

How to automatically authenticate into GitHub from Git Bash using my Public and Private Keys instead of username and password?

git,authentication,github,public-key,git-bash
Every time when I write git pull origin master or git push origin master or anything else in Git Bash I have to insert my username and password to login into GitHub. I would like instead to automatically authenticate into GitHub using my Public and Private Keys. I've already created...

How do I view the list of commits that haven't been pushed yet?

git,git-bash
I like documenting minor changes as separate commits and finally use git interactive --rebase to combine commits and change commit messages like I deem appropriate. Is there a way to determine which commits I haven't pushed yet without manually checking Github i.e. is there a way to find out from...

Properly set SSH home in GitPortable

ssh,git-bash,portable-applications
I would very much like to take my Git install with me wherever I go, so I have installed GitPortable via PortableApps. Unfortunately, the OpenSSH utilities available in git-bash insists on placing/searching for the .ssh folder in a nonsensical place (C/.ssh). Now, I have seen others with the same problem,...

Embedding in the Powershell script issue

powershell,scripting,git-bash
Creating this question based on the advice of another users advice, it is a follow-up of this. The scenario is that I am currently trying to create a Powershell script, that a first-time user can run, which will install a bunch of programs and complete several configuration changes. One of...