Tag: bash

Cygwin: color coding and branch info for git?

Seem to be having a problem because I just recently changed my client for the gitbash to cygwin but i am missing color coding when i do git status for example and also the bash prompt doesn’t include the current branch / rebase etc Does anyone know how to make cygwin look like gitbash? You […]

Cygwin gitk issue

I have recently installed all of the X11 packages in the cygwin setup and now have is massive annoying error with not being able to see gitk. Everything was working perfectly well until I installed this stuff. Before I had this issue I didn’t really note done any of the configuration I merely started xwinserver […]

Why can't Git Bash run my executable?

I am on git-for-windows Git Bash. I can’t run an executable on the command line: Pedr@Abc-07 MINGW64 /c/dev $ ls sqlite3.exe sqlite3.exe* Pedr@Abc-07 MINGW64 /c/dev $ sqlite3 bash: sqlite3: command not found Why is it so?

Escaping git bash after reflog, or commit, etc

When I’m using something like git reflog, I lose my ability to type in commands. I don’t know what you look up, because I’m relatively new to bash. So, what’s the terminology I can use to go back to running git commands after running a reflog?

Check if git remote exists before first push

I’m writing a bash script and I need a test to see whether a given remote exists. Suppose, for concreteness, that I want to test whether the remote faraway exists. If I’ve pushed something to faraway, I can do if [ -d .git/refs/remotes/faraway ]; then …. But as far as I can see, the alias […]

Zip latest committed changes only

Git has the very handy archive command which allows me to make a copy of a particular commit in a .zip archive like so: git archive -o ../latest.zip some-commit This will contain the entire working tree for that commit. Usually I just need the changed files since a previous release. Currently I use this to […]

Git error remote: Empty password

I’m trying to clone my git repo from bitbucket, and when I enter this command: git clone https://naor_shoyhat@bitbucket.org/naor_shoyhat/hello-world.git The bash then prompts me a window with areas to enter username and password. I enter them and then I receive this error: remote: Empty password fatal: Authentication failed for ‘https://naor_shoyhat@bitbucket.org/naor_shoyhat/hello-world.git/’

How to register newly mounted drive in git bash?

In my day-to-day work (I’m using MS Windows), I keep my git bash (actually using console2 for this) open for the whole day. It is also very frequent that I mount new drives that I would like to work with git. However I noticed that I need to exit the bash and open it again […]

Shell script – trying to validate if a git tag exists in a git repository in an if/else statement

I am creating a deploy script for a zend application. The scrip is almost done only I want to verify that a tag exists within the repo to force tags on the team. Currently I have the following code: # Fist update the repo to make sure all the tags are in cd /git/repo/path git […]

git show HEAD^ doesn't seem to be working. Is this normal?

I’m using Zsh and and trying to run git show for a project to see my revision history. If I do git show HEAD it works fine showing me my last commit, however the following commands don’t work [master↑5⚡]:~/project $ git show HEAD^ zsh: no matches found: HEAD^ [master↑5⚡]:~/project $ git show HEAD^^ zsh: no […]

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