Tag: bash

Shell script to check if specified Git branch exists?

This question already has an answer here: Is there a better way to find out if a local git branch exists? 11 answers

Git 2.5.1's bash console doesn't open python interpreter

If I do it in CMD, it works without issues, but if I try it in Git Bash it doesn’t work. I like to use Git Bash as my only console, but I can’t do that if it doesn’t work with Python 3.4. Example is in the picture below. This can be easily reproduced. Uninstall […]

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 […]

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