Tag: bash

How do I force-quit Git Bash?

I’m in Nano via ssh on my server via git bash. And I can’t do anything. I can scroll up and down but I ***’ed it up somehow. How do I quit it? I tried to find the process but windows can’t tell me

Why can I view some Unix executable files in Mac OS X and not others?

I am on a Macbook Pro on Mac OS X 10.10 (Yosemite). When I go to /usr/bin, git is there as a unix executable file. When I open it up in Sublime Text, all I get is unreadable machine code. However, when I open up a different Unix executable file—in my case, a shell script […]

Automatically reword all rebased commits

I want to be able to touch up my commit messages before I push them to my remote, but I want to automatically do that. I can reword all my additional commits by doing git rebase -i origin/master This brings up an editor where I can change all the commits from pick to reword. Then […]

Bash. Line-by-line output into another procedure

I’ve got a simple script for GIT: cp –parents $(git diff –name-only $1 $2) $3 git diff … – get modified files list between commits ($1 and $2). cp –parents … – copies them into desired directory ($3). But the only problem exists: white spaces in directory names. Script doesn’t work properly in that case. […]

Why isn't tilde (~) expanding inside double quotes?

I want to check whether or not the hidden .git folder exists. First thought was to use: if [ -d “~/.git” ]; then echo “Do stuff” fi But the -d apparently does not look for hidden folders.

Unable to mark file in git

I am trying to ignore the changes made to .gitignore file. For achieving this I am using this command git update-index –assume-unchanged bin/.gitignore on git bash. When I execute, I see Unable to mark file bin/.gitignore response on my git bash. How to solve this and why am I facing this problem? I tried this […]

Git installer for Mac: Why is /usr/local/git/bin in my PATH?

I recently installed the latest version of git (1.7.6) for OS X (10.7). When I run echo $PATH, it returns this: /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin What I’m curious about is why/how /usr/local/git/bin is there. It’s not in any of the usual places, like .bash_profile or .profile. Where does the OS X installer add this to?

How can I verify git clone is working correctly?

I’m following the documentation provided here by git to setup a bare git repository in a folder called root. I started in the root directory where I ran git init git -A * git commit -m “test” I then ran git status and all appears good. Next I ran the line from the documentation at […]

How to let Jenkins git commit only if there are changes?

I have a Jenkins job that builds from a github.com repository’s master branch with Maven (mvn clean install), then checks for license headers in Java files and missing NOTICE files, and adds them if necessary (mvn license:format notice:generate). Sometimes this will result in changed or added files, sometimes not. Whenever there have any changes been […]

How do I get Git's latest stable release version number?

I’m writing a git-install.sh script: http://gist.github.com/419201 To get Git’s latest stable release version number, I do: LSR_NUM=$(curl -silent http://git-scm.com/ | sed -n ‘/id=”ver”/ s/.*v\([0-9].*\)<.*/\1/p’) 2 Questions: Refactor my code: Is there a better way programmatically to do this? This works now, but it’s brittle: if the web page at http://git-scm.com/ changes, the line above may […]

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