Tag: bash

How to deploy through AWS codeploy using composer when a dependency is in a private repository

So I’m new to AWS Codedeploy, I have it successfully deploying with one little issue, every time I add to my deploy script composer update I get this lovely little message “Permission denied (publickey)”. Now when I run composer update as ubuntu user it runs fine, my key is setup in the private repository fine, […]

Detecting current directory in bash script

I am attempting to write a script that initializes my git hooks differently whether my git repo is a submodule or just a regular repository. It currently looks like this: # Get to root directory of client repository if [[ “:$PATH:” != *”:.git/modules:”* ]]; then # Presumed not being used as a submodule cd ../../ […]

Command line opening of Atom triggering Windows command prompt

My normal routine for opening up a project in the Atom editor on Windows is to go to the directory using the Git Bash terminal and typing atom . This opens the entire contents of the directory in Atom. After a recent Windows update, when I type atom . I now see this: Microsoft Windows […]

GIT fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree in Travis

I have the following configuration: git version 1.8.5.6 GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu) I called zgit_info_update and also tried to make commit. But I am still encountering with issue when run git diff –name-only dev from bash in Travis (https://github.com/travis-ci/travis-ci/issues/6069). Can somebody assist to get this working? Here the output: git version 1.8.5.6 GNU bash, […]

Using p4merge as git diff tool

I use windows 7. I want to use p4merge as Git diff/merge tool. I follow this article and this one to setup and config p4merge: git config –global merge.tool p4merge git config –global mergetool.p4merge.path “C:/Program Files/Perforce/p4merge.exe” git config –global diff.tool p4merge git config –global difftool.p4merge.path “C:/Program Files/Perforce/p4merge.exe” And these lines are from git config: merge.tool=p4merge […]

Mouse options not working in Vim on Git-Bash Windows

I have set mouse=a in my user .vimrc, which is where $MYVIMRC leads to, and editing this .vimrc does reflect my vim client (for example changing the colorscheme works). However, the mouse options are not working. http://vimdoc.sourceforge.net/htmldoc/options.html In the above link I found some information about which terminals it works in: Enable the use of […]

modifying working directory and staging area temporarily in git pre-commit hook

I’m using an an approach similar to this one to use a pre-commit hook to track changes to my database schema (as well as a few metadata-ish tables). I like to try to keep my commits clean so I want to be loudly warned in the commit message when there are automatic changes being staged/committed. […]

autopep8 in a git pre-commit — how to automatically recommit?

I have a git pre-commit hook that runs autopep8 on touch python files. My problem with it is that: # If there are whitespace errors,it printsthe offending file names and fails. (see below.) Question: How do I make it re-add and re-commit the files that I currently have to fix manually? Thanks! #!/bin/bash # # […]

Git GUI/TortoiseGit Not calling hooks that use powershell correctly? (Windows)

I’m seeing some strange stuff in how Git GUI and TortoiseGit call Git hooks. Given the following post-checkout hook, one would expect git to execute the powershell command and create the file: #!/bin/sh c:/windows/system32/WindowsPowerShell/v1.0/PowerShell.exe -Command “New-Item File.txt -type file” If I run this hook using the Git Bash, the file is created in my repository. […]

Git error 400 when doing push

When I do a git push I come up with this error: error: The requested URL returned error: 400 while accessing https://github.com/nathandunn97/SchoolAdvisor.git/info/refs?service=git-receive-pack fatal: HTTP request failed I am using Ubuntu 13.04 and my git version is 1.8.1.2.

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