Tag: bash

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 […]

OpenShift action hook deploy issues

I have a symfony 2 project I am trying to launch on OpenShift online. I created the directory as required and running symfony locally works perfect. However, when I deploy to my OpenShift application the deploy and post_deploy action_hooks do not run. I do not even see the output on git push like they mention […]

git branch | grep '^SomeThingInFrontOfLine' not working

I have a lot of git branches, I want to search only those begin with certain letters i.e $git branch branchA.abc.1234567 branchA.cbc.1234457 branchB.cbc.1234457.branchA.backup branchC.cbc.1234457.branchA.backup And i want to only search those begin with ‘brnachA’ $git branch | grep ‘^branchA’ But the above command returns nothing, any suggestions?

How to execute git log on windows cmd?

I have the following command: git log –pretty=tformat:'<li>%h %ci %d %s</li>’ > changelog.html That saves the git log to the changelog.html file. When i execute it through git bash, it works fine, but when i put this code in a .bat file and run it, i get the following error: The system could not find […]

Why did my local git tag go from “hello” to “hello-1-48281”

$ git tag hello $ git describe –tags hello … work work … $ git commit -m “work stuff” $ git describe –tags hello-1-48281 Say what? What’s the extra stuff? Doesn’t look like a SHA1… is it possible to just get “hello” back?

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