Tag: bash

GitForWindows keeps asking for OpenSSH password (Wish Application)

I just installed GitForWindows and it keeps asking me for a password even if I enter it correctly. I’ve never seen this dialog pop up before on installations on other machines (though I haven’t used Git Bash until now). How can I prevent this from popping up? I’m using ssh-agent manually anyway.

How to add color to bash output of `git diff –name-status` by file status?

I would like to style the bash output for git diff –name-status so that the files with status D, M, and A are different colors. To style general git bash I use the color options in .gitconfig. # .gitconfig [color] branch = auto diff = auto status = auto [color “branch”] current = yellow reverse […]

git pull/clone private repo using bash script only

I am new to github and bash scripting, so help will be appreciated. I want to run a script that will clone a private github repo into my instance. Since the repo is private, I understand that I need to do this through ssh. So my script starts like this: #!/bin/sh ssh-keygen -t rsa #HOW […]

Is running git update-index –refresh from PS1 prompt safe?

I’ve been researching the fastest way to check for changes in a repo to update the PS1 prompt. For reasons not worth elaborating, no access to the __git_ps1() macro, and anyway other posts have suggested various commands, including those used in __git_ps1(). Reason: I’m accessing repos on a remote server over VPN & ssh, with […]

git merge-file fails with bash process substitution operator that uses git show

I’m trying to merge changes from a file which is in git into one which isn’t under version control (more context) using a 3-way-merge. As there is a git merge-file <local> <base> <other> which expects 3 files and as I don’t fancy creating intermediate files and forgetting to clean them up, i used the bash […]

Git does not recognize repositories while executing a hook

In my post-receive hooks I want to run this simple hook which is actually just two lines if you take out the echos and what not. I verified the commands are correct by ssh(ing) into the server and double checking the paths. However I get this error: remote: fatal: Not a git repository: ‘.’ What […]

the git hooks post-update seems not working

I want my git server can checkout automatically, so I try to use the .git/hooks/post-update the content is #!/bin/bash cd /htdocs git reset –hard HEAD but it didn’t work so i created a script on my server which includes such command and in the file “post-update” i wrote /bin/bash /cron/git #git is the script when […]

AndroidStudio check out project from github,but when open the project prompt “ Error Loading Project: Cannot load 2 modules Details…”

When I create project in AndroidStudio,I select “check out project from version control “,then I select git,I clone project from github,it is successed,but when I open the project,nothing to show and it is prompt “Error Loading Project: Cannot load 2 modules Details…”,I can not resolve it,but when I use git bash clone the project and […]

bash git pre-commit hook running MatLab function does not wait for a result

I have a MatLab project on Win-7. Its version controled with Git-Extension. I have a matlab function that runs a kind of self-test. It’s named pre_push_test_suit, and it exits with either code 0 (OK) or 1 (there is a problem). I want to implement the pre-commit git hook, that will prevent pushing to the central […]

Uploading python functions to aws lambda

I’ve developed two AWS lambda python functions. As we all need source-control I am saving my project in git. The question is what is the best way to update AWS lambda with updates from git. AFAIK currently the only way is to use aws cli with update-function-code. I wrote the following bash to manually update […]

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