Tag: bash

Git Bash giving sh.exe: ruby: command not found

I am using Git Bash on Windows Vista Business. I am trying to install Redmine. Basically on step 4, I need to get RubyGem installed before I install the bundler as part of the dependency install (http://www.redmine.org/projects/redmine/wiki/RedmineInstall). I downloaded rubygems-2.2.2.zip from https://rubygems.org/pages/download. Then I unzipped the file a folder on my desktop. In Git Bash, […]

Diff only changed parts of lines

Is it possible to show only differences between old and new lines using git diff? Here is content of file a.txt: 123456789 And here is content of file b.txt 123455789 Here is normal git diff output: And here is what I’m trying to accomplish: I’d prefer to do this using git diff, but if it […]

Mongod command not found (Windows7)(node.js)

I have been trying to get my mongodb going for about a day now. The problem seems to be that the mongod command is not found. I have the npm package mongoose installed in my node.js build. When i try to start the server with the mongod command the git bash returns that the command […]

Create multi-word alias in bash?

I want to create an alias in bash, such that git diff somefile becomes git diff –color somefile But I don’t want to define my own custom alias like alias gitd = “git diff –color” because if I get used to these custom alias, then I loose the ability to work on machines which don’t […]

How to show git status info on the right side of the terminal?

Do you know if it is possible to configure the bash prompt to show the git status / branch info on the right side as zsh can do? This randomly screen shot from the internet shows what I mean.

Git clone with username password authentication in one go

My current command is git clone ssh://username@onboard.com/srv/git/repo after that password … fine, works good. Now I would like do this in one line. Something like that: git clone ssh://username:password@onboard.com/srv/git/repo but it`s not working and gives me the message: Please make sure you have the correct access rights and the repository exists. How can I clone […]

Translate parse_git_branch function to zsh from bash (for prompt)

I am using this function in Bash function parse_git_branch { git_status=”$(git status 2> /dev/null)” pattern=”^# On branch ([^${IFS}]*)” if [[ ! ${git_status}} =~ “working directory clean” ]]; then state=”*” fi # add an else if or two here if you want to get more specific if [[ ${git_status} =~ ${pattern} ]]; then branch=${BASH_REMATCH[1]} echo “(${branch}${state})” […]

quitting git log from a bash script

i’m trying to write a ‘live git log’ bash script. here’s the code so far: #!/bin/sh while true; do clear git log –graph -10 –all –color –date=short –pretty=format:”%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset” sleep 3 done my problem is that git log uses a pager and you have to press q to quit or it will […]

Puppet exec command runs in shell, but not via puppet

I’m trying to use vagrant to set up a dev environment that automatically clones two repositories if they haven’t already been cloned. I wrote a simple script to clone the repos, after failing in many, many ways to get puppet to run the git command directly. For some reason I thought this method would be […]

Commit and push a Git repository using Rails

This question already has an answer here: Create Git commits and push to GitHub with Ruby [closed] 2 answers

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