Tag: bash

git hook permission problem

I’ve set my git working structure as follows (thanks to a recommendation in another question git : Small project work) /live/website | | /path/to/staging (bare) | | | | dev1 dev2 Currently, both dev1 and dev2, push the projects to the /path/to/staging repo. I have a hook in /path/to/staging, that automatically triggers a git pull […]

Find all files except those which is under version control systems (git or SVN)

I have to find all files on my computer except those which is under version control systems (git or SVN). I don’t have to find not only meta files of VCS but all files in my working copy so i can’t use something like find . -type f \! -path \*/\.svn/\*; Please, help me, cause […]

Git checkout can't auto-complete with bash

I’m using ubuntu with bash. When I typed git checkout then press tab, I expected it would show a list of branches, but I got: git checkout bash: eval: line 345: unexpected EOF while looking for matching `” bash: eval: line 346: syntax error: unexpected end of file I googled it but found nothing. And […]

Getting a gitprompt to run when executing commands

In bash, I’m using a gitprompt to show the current status of my git repository, so my PS0 looks like this: [time][repo name][current path][number of added/modified files]$ This is set in ~/.bashrc where I’m exporting the PROMPT_COMMAND export PROMPT_COMMAND=$PROMPT_COMMAND’;export PS1=$(gitprompt.pl c=\+ u=\~ f=\* A=\^ B=\\\\ F=\ \>\> statuscount=1)’ I’m also using screen (which may come […]

Git push corrupting my export with '\r' characters

Whenever i push through git all my bash scripts seem to be corrupted with the \r character. It doesn’t affect the code, but it just adds a significant amount of noise to my work. Looked all over the web, but can’t seem to find a solution. Example: echo “*************************************************************************”\r ^ Every line in my bash […]

Meta-alias in Git Bash

Question I’m curious to know if one can create an alias for making aliases in Git, i.e. a meta-alias, so that instead of typing git config –global alias.-whatever one can just write git alias-whatever. Background: I’m just warming to Bash and Git, and have recently started creating aliases like git cfg for git config –global […]

Bash Folder-File coloring in msysgit on Windows?

I am using msys Git in Windows. I have already gotten coloring for my prompt via setting the PS1 variable in .bashrc. However – I am also looking to get standard bash coloring – for example, a different color for files vs directories when I do “ls”. Does anyone know how to achieve this?

Windows + Cygwin + Single Line If Else + Puppet

So I have a single line bash command that checks if a directory exists. If it does, it git pulls, if it doesn’t, it clones the repository. I am running a Cygwin on my Windows box and when I run this command in Cygwin it works perfectly: if [ -d C:/repo ]; then cd C:/repo […]

git push not working inside a cron job

I am currently cleaning up a mess left by someone else on a CentOS 6 server. There is an application that is required to be backed up to a github account every 6 hours. There is a script that takes care of preparing the data and it takes care of the git add and git […]

CRLF issue when running Django via Vagrant on Windows 7

I am using Vagrant and Oracle Virtual Machine to run a Django project on Windows. The problem is that when I try to execute one of the file, I’ve got an error: -bash: /url_to_my_file: /bin/bash^M: bad interpreter: No such file or directory I’ve already Googled for the problem is here what was tried: 1) At […]

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