Tag: bash

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?

missing end to balance this if statement

i try to add this lines to my .bash-profile if [ -f “$(brew –prefix)/opt/bash-git-prompt/share/gitprompt.sh” ];then source “$(brew –prefix)/opt/bash-git-prompt/share/gitprompt.sh” fi but I get this error Missing end to balance this if statement .bash_profile (line 2): if [ -f “$(brew –prefix)/opt/bash-git- prompt/share/gitprompt.sh” ]; then ^ from sourcing file .bash_profile called on standard input Dose anyone have an […]

Why does git-pull fail with signal 13?

Setup I’ve written a small script to do automatic pull/commit/push for some personal data. This script works great on my laptop (version but on my server, the git pull command is failing with signal 13. I was running version (these are both ubuntu, but the server is 12.04.4 LTS vs 13.10 on the […]

How to cancel long output in the terminal?

Taking the command git log as an example, the terminal usually gives a long printout that you need to press ‘enter’ a number of times in order to page through multiple commit logs. How can I cancel the log printout so that I can get back to doing another git command?

Make bash commands to fall back to git commands if git command exists

Basically I want to type show and it checks if there is a show command or alias is defined and fire it and it is not defined fires git show. For example rm should do rm but checkout should do git checkout. Is it possible to program this in bashrc?

fatal: remote server hung up unexpectedly

I’ve looked at the other threads with similar questions, but I’m new to git, so most of it didn’t make sense 🙁 Here’s the problem: I can’t push a simple readme onto my repository on github. $ ssh -T git@github.com seems to be working fine. But whenever I push the README using the following: $ […]

Problem with appending to bash arrays

I’m trying to create an alias that will get all “Modified” files and run the php syntax check on them… function gitphpcheck () { filearray=() git diff –name-status | while read line; do if [[ $line =~ ^M ]] then filename=”`echo $line | awk ‘{ print $2 }’`” echo “$filename” # correct output filearray+=($filename) fi […]

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