Tag: bash

Windows Git Bash shell cannot find commands?

I have recently been screwing around with Windows Git Bash shell to try and force its ~ to not be my mapped network drive Z: and instead something more logical and useful. To do so I tried to edit C:\Program Files (x86)\Git\etc\profile, upon saving my changes and restarting it seems that GitBash now cannot find […]

Console closes in fresh install of Git Bash

I just installed the most recent Git for Windows (https://git-scm.com/download/win) using the default installation settings. I have the 64 bit 2.10.0 version of Git running on Windows 10. When I tried using Git Bash here, the console closes immediately and it produces a mintty.exe file with the following text: Exception: STATUS_ACCESS_VIOLATION at rip=00100407559 rax=FFFFFFFFFFFFFFFF rbx=00000000FFFFC5D0 […]

How to append tab on every new line in a custom pretty log format?

I have been playing around with what customizations you can do with Git logs and I think I have determined the right log for me. However, I am not sure how to tab the entire git message. I can do it on the first line and I am assuming that the entire git message is […]

Using a git alias from cmder

I use Bash to work with Git and, using a combination of Git and Bash aliases, am able to execute commands like “g s” for git status. Having installed cmder I am able to set an alias for git. However, I am unable to execute a git command using the “g” alias – I just […]

In git, how can I perform a regex replacement on changed lines only?

At first glance, this may seem like a duplicate of In git, how can I remove Windows line endings from changed lines only?. However, simply adding ^[+] to the beginning of a pattern will not always work. For example, I recently wanted to change tabs (\t) to 4 spaces but only for changed lines. My […]

Share project on GitHub using alternate account

I’m trying to share a project on GitHub and want to use IntelliJ IDEA’s built-in “Share project on GitHub” option. When I click on it, I am asked to log in to GitHub, which I do successfully, and then choose the files I want to commit so that they can be pushed to the repository. […]

Is there a way to implement push to deploy efficiently …?

All the methods I’ve seen on line use the checkout command on a post-receive hook. From what I understand this checks out all the files. So if I only change one file it will still update all of them. Is there a more efficient way to do this?

How to use posh-git-bash in oh-my-zsh?

I can use the posh-git–bash in normal bash shell, but I can’t use it under oh-my-zsh. First of all, I follow github project posh-git-sh to create ~/git-prompt.sh, and add the following scripts to the bottom of file ~/.bashrc source ~/git-prompt.sh PROMPT_COMMAND=’__posh_git_ps1 “\u@\h:\w” “\\\$ “;’$PROMPT_COMMAND reopen the terminal, and go to a git project folder, all […]

Is it possible to overwrite git command with my own version?

Ok, let me clarify what I mean. I’m writing a few shell scripts for some special use cases working with git. Long story as to why. Anyway, I could call them all as separate scripts, but I think it would be beautiful and elegant if I could basically make them new git commands. I would […]

How to configure git output when piped?

I noticed that if you do $ git diff -M –stat out_of_the_water/out_of_itself => he_watches_my_gauze_dress/blowing_on_the_line | 0 1 file changed, 0 insertions(+), 0 deletions(-) or $ git diff -M –stat | cat …/out_of_itself => he_watches_my_gauze_dress/blowing_on_the_line | 0 1 file changed, 0 insertions(+), 0 deletions(-) The output is different and the first filename is truncated. This is […]

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