Tag: bash

git grep showing absolute paths

I would like to use git grep from outside the repository, for example editing a file in vim. This works: git -C /path/to/gitrepo/ grep ‘my search’ The problem is that the results show relative path from /path/to/gitrepo. So, I cannot open them directly. Is there any way to generate the full file path to the […]

how to terminate a process in Git

hi guys i was practicing git and i edited a file, i wanted to commit my modification but it open a message editor bash widow n i couldn’t close it till i closed the bash terminal. i opened it again n wanted to reDo commit it gives me this message how could i terminate this […]

Heroku CLI doesn't work with Git Bash — keeps looking for Ruby in the current directory

So if I’m on Desktop/code Ka@KA ~/Desktop/code $ heroku console /c/Program Files (x86)/Heroku/bin/heroku: line 4: /c/Users/Ka/Desktop/code/ruby: No such file or directory /c/Program Files (x86)/Heroku/bin/heroku: line 4: exec: /c/Users/Ka/Desktop/code/ruby: cannot execute: No such file or directory It’ll look for ruby in Desktop/code If I’m on any path, it’ll look for Ruby on that path. Why is […]

Can't switch my git bash accounts

I wanted to practice using my git bash but could switch accounts. When I type git config user.name what should I put here? And what about git config user.email? Don’t I need to type my password anywhere? That’s kinda weird. So the problem is that I can’t push changes using my second account, I got […]

Can’t run ”gem install bundle’ in git bash terminal

I’m new to Web development with Sinatra. I’ve been trying to run bundle install command in git–bash terminal, but it’s says that: bash: bundle: command not found I’ve then tried to install bundler but then I’m kept getting this error: bash: gem: command not found I can’t even run gem install bundler command in git-bash […]

“Open git bash here” and “Open command prompt here” disappeared from Windows explorer context menu

Short of re-installing git or editing the relevant registry key that adds context menus to the shell myself, I was wondering if there was another way to bring back the “Git Bash Here” and “Open command window here” menus? I am using Windows 7 Home Premium 64-bit.

Broken git workspace, how to recover?

My configuration is with Win10, latest Git 2.10 and I work with GitHUB using SourceTree. For SourceTree, it uses the Git version of my system (not the embedded one). Apparently a couple of files of 2Mb size (yes I double checked it), pop-up a warning inside sourceTree when trying to stage the files, asking for […]

Git branch picker with dialog: escaping quotes

I want to have a git branch picker for a shell script and ran into a problem with escaping quotes when passing the list to dialog with xargs. Maybe someone can help me find and fix the issue? I’m using the following command to create a dialog: git for-each-ref –sort=-committerdate refs/heads/ –format='”%(refname:short)” “%(authorname): %(contents:subject) (%(committerdate:relative))”‘|xargs […]

Update Author Name in all Commits in git after particular date

I tried it but could not find how can I compare GIT_COMMITTER_DATE with some specific Date to update author and committer email.. This is what I have tried but I need to add date comparison in if conditions extra to update particular commits otherwise it’s picking up very old commits too.. Here AFTER_DATE is date […]

git fetch –quiet is writing to stdout instead of bieng silent

git fetch –quiet &>/dev/null & is still writing to stdout asking for the username. Is there any workaround to archive this. Edit: Adding details I have a custom script to display git status(modified version of bash-git-prompt) The script runs the above command in the background. The problem with the above command is when I cd […]

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