Tag: bash

Login is currently incompatible with git bash/cygwin

I just download this version Git-2.6.1-64-bit.exe my OS is windows 10 64bit.. why I cannot still log in it? is Git-2.6.1-64-bit.exe the latest one? before it was MINWG32 now updated become MINWG64 but still I cannot login..help me solve this issues I don’t have any solution for this instead to use the cmd.exe…. but I […]

Laravel Homestead Installation: bash init.sh not working

I’m trying to install Laravel Homestead in order to be able to test my Laravel projects locally. I’m following this tutorial: http://laravel.com/docs/4.2/homestead In the “Installing Homestead” part I followed the second step “Manually Via Git (No Local PHP)”,I don’t have any PHP installed locally and can’t use Composer. (Wasn’t PHP supposed to be installed as […]

Unable to use bash script to remove files from git history

I have a problem with this bash script I am writing. I am trying to apply step 3 of this procedure from Github documentation to remove all files in our repositories history from our git history. For example, if .gitignore ignores .txt, I want to remove all .txt from the history. And so on for […]

Determine relationship between commits

In a linear history, two commits A and B can have one of three states: A and B are the same commit A strictly before B B strictly before A Git’s nonlinear history allows for four additional options A and B share both a parent and child A and B share a parent but not […]

“${1-}” vs “$1”

The code for git bash completion, specifically the function __gitcomp, uses parameter expansions like “${1-}”. This appears to be similar to “$1”. What is the difference? Also: where is this documented in the bash manual?

How to check if Git is installed from .bashrc

I’m using Git, I’ve changed the following line in .bashrc, To show the current checkedout branch in prompt, when pwd is a Git Repo. Operating System I’m using is: Ubuntu 32bit # Original PS1 Line PS1=’${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ‘ I’m using this line to display current branch of git repo in shell prompt, instead of, the above […]

What are the commands for using Git Bash in Windows e.g. when in git diff mode?

In Windows, in Git Bash, if I do a git diff I get all the differences flushed to the console with some sort of prompt to control the output buffer. What are the commands I can use in this mode of Git Bash? I don’t know where to look for a quick reference. I’ve worked […]

How to write a shell script that checks if git repository is up to date?

#!/bin/bash #gedit tidy plugin init=false SRC_DIR=~/repos DIRECTORY=”Gedit-Clientside-Plugin” #making repos directory if [ ! -d “$SRC_DIR” ]; then mkdir $SRC_DIR; fi if [ ! -d “$SRC_DIR/$DIRECTORY” ]; then init=true cd $SRC_DIR && pwd && git clone git://github.com/trentrichardson/Gedit-Clientside-Plugin.git && cd $DIRECTORY else cd $SRC_DIR/$DIRECTORY fi #below here is what I’m having trouble with git pull 1>&1 | […]

Adding git alias to .bash_profile not working

I edited my $Home .bash_profile to include some git alias commands. I am rather new to this and I can’t figure out what went wrong. .bash_profile alias gs=’git status ‘ alias ga=’git add ‘ alias gb=’git branch ‘ alias gc=’git commit’ alias gd=’git diff’ alias go=’git checkout ‘ alias gk=’gitk –all&’ alias gx=’gitx –all’ alias […]

Git – How to find all “unpushed” commits for all projects in a directory?

I’m finally getting used to Git and, after the initial steep learning curve, I must say it’s quite good (I just miss the single file externals, but that’s another story). I have, however, an issue that I can’t solve: I’m currently working on a dozen projects at the same time. They are all interconnected and […]

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