Skip to main content

Questions tagged [git-bash]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
121 votes
6 answers
303k views

How do I modify my Git Bash profile in Windows?

I'm using Git Bash on Windows 7 and would like to set up Bash profile aliases such as alias gs='git status' to make my life easier. How can I do this?
Brian's user avatar
  • 1,431
117 votes
12 answers
209k views

How to add more commands to Git Bash?

I am working on windows machine and I use bash shell which comes with Git. But there are many utilities which are missing in this version of bash shell. How can I install more commands on this shell?
Ankit Zalani's user avatar
  • 1,287
102 votes
2 answers
162k views

What is Git Bash for Windows anyway?

I have happily been using Git and Git Bash from https://git-scm.com/. There is a page with more information here: https://git-for-windows.github.io/. Yesterday I ran into a problem with rsync, and I ...
geneorama's user avatar
  • 1,400
101 votes
11 answers
134k views

How to add the 'tree' command to git-bash in Windows?

I'm using git-bash in Windows 7. I'd like to see a tree of the current directory. However jcollum@DEVELOPER01 ~/Dev/express_coffee $ tree . sh....
jcollum's user avatar
  • 5,183
97 votes
6 answers
149k views

How to make git not prompt for passphrase for ssh key?

I'm using git bash and I setup ssh key using ssh-keygen and each time I do something with a repo git ask me for passphrase for /c/Users/jankiewj/.ssh/id_rsa. Is there a way to disable that passphrase. ...
jcubic's user avatar
  • 2,963
94 votes
4 answers
86k views

How can I find out the command line options for git-bash.exe?

Apparently my google-fu sucks... I know these from other StackExchange posts: --cd-to-home # Change directory to home --cd=<path> # Change directory to <path> -i # ? -...
816-8055's user avatar
  • 1,267
71 votes
5 answers
53k views

What does an `output is not a tty` error mean?

I tried to write the output of the command php -i to the a file using php -i > info and received the following error: output is not a tty What does it mean? I'm using git bash on Windows.
Max Koretskyi's user avatar
56 votes
6 answers
94k views

Where is the Git Bash `/` directory?

When I open Git Bash on Windows 7, the default directory is /. It has *nix-style subdirectories, and cd .. doesn't change the directory. Where is this directory on my Windows machine? The directory C:...
Joshua Meyers's user avatar
37 votes
6 answers
124k views

Windows & Git Bash: Bash PATH to read Windows %PATH% system variable

I've recently added a directory to the Windows PATH manually by going into Control Panel -> System -> Advanced system settings -> Environment Variables -> User variables -> PATH. (...
Ahmed Fasih's user avatar
27 votes
4 answers
75k views

Installing programs in git bash?

I'm running git bash on windows and I'd like to install some of the linux tools I'm familiar with but apt-get, yum, etc don't appear to work. How can I install programs in git bash?
wogsland's user avatar
  • 471
21 votes
4 answers
22k views

Can git-bash and cygwin shell do the same things?

On Windows 10, can git-bash and cygwin shell do the same things? What can one do but the other can't? For example, As shells, can they both work the same as bash? What programs and commands can run ...
Tim's user avatar
  • 17.3k
18 votes
3 answers
61k views

How to fix "Permission Denied" in Git Bash in Windows 10?

Whenever I tried to run this command: python get-pip.py, git bash gave me this response: bash: /c/Users/Sergio Ley/AppData/Local/Microsoft/WindowsApps/python: Permission denied. I don't know how to ...
Sergio Ley-Languren's user avatar
17 votes
1 answer
7k views

How to disable git bash daily updates checking?

I've installed git bash and ticked the "Check daily for updates" option. I thought that it will update automatically, but it requires me to configure the set up manually each time. I don't update it ...
Ivan Yurchenko's user avatar
17 votes
2 answers
10k views

How can I configure git bash to display a timestamp for each command?

I run git's bash on Windows7 to manage source control for projects. Can I edit C:\Program Files (x86)\Git\etc\git-prompt.sh to enable me to timestamp when I ran commands? e.g. instead of user.name@...
StuperUser's user avatar
16 votes
3 answers
13k views

Setting to use git-bash as default shell when connecting remotely via OpenSSH to Windows Server 2016

The Powershell OpenSSH website has good instructions on how to install and use OpenSSH. These include how to "Configuring the default ssh shell (optional)" If I elect to use git-bash instead of ...
Clay's user avatar
  • 561
14 votes
3 answers
20k views

How to install mintty into 'Git Bash' on windows?

I have installed git on windows from http://git-scm.com/download/win and I use the Git Bash shortcut to access git commands. Unfortunately, Git Bash uses the Windows Command (CMD.EXE) Terminal which ...
Chris Snow's user avatar
13 votes
1 answer
11k views

Git for Windows: how to apply changes in PATH without reboot?

I'm using Git for Windows on Windows 7. When I adjust the PATH environment variable, the changes are not applied immediately for console windows. In order to force applying the changes for a ...
lolmaus - Andrey Mikhaylov's user avatar
12 votes
2 answers
15k views

Why do i need prefix openssl with winpty on windows bash?

Why do i need prefix openssl with winpty on windows bash? Why does command openssl genrsa -des3 -out ca.key 4096 hangs and doesn't respond while winpty openssl genrsa -des3 -out ca.key 4096 is ...
Patlatus's user avatar
  • 233
12 votes
1 answer
5k views

Open A New Tab In ConEmu, in the same Directory (git bash)

I want to assign a keyboard short cut within ConEmu that will open a new tab, in the same directory as the current tab is within. So something like: -new_console:d:[<pwd>]%ProgramFiles(x86)%\...
chrispepper1989's user avatar
12 votes
1 answer
8k views

Default console in ConEmu

I have git bash setup as a predefined task (task #1). But when I open ConEmu it defaults to cmd console, how do I change the default console to git bash?
jkarimi's user avatar
  • 223
11 votes
3 answers
47k views

Install GCC in Git for Windows bash environment

I have Git for Windows installed on a Windows 7 machine (no, sadly I can't switch to W10 on this particular machine). This comes with a bash environment that uses MinGW-64 but only includes some ...
Toby's user avatar
  • 836
9 votes
6 answers
18k views

can we open gitbash from atom text editor

Is there a way to open gitbash from within atom text editor. I want to have gitbash or other command line client in one of the panes.
SAN's user avatar
  • 335
9 votes
4 answers
42k views

Running PHP works in Command Prompt but not Git Bash

I've recently got a new laptop and have been in the process of setting it up. I've installed WAMP, which is what I use to do my PHP development (installs Apache2, MySql, and PHP). I also like to use ...
James's user avatar
  • 193
9 votes
1 answer
28k views

How can I use 'git add' command on a file whose path includes a directory with spaces

I'm trying to use Git Add command to stage a couple of files for committing later. However, I can't seem to add it because Git bash doesn't like a directory with spaces in it. How can get around this ...
SpartaSixZero's user avatar
9 votes
2 answers
18k views

Git Bash - Windows - Different font size between start screen launch and explorer launch

I am using Git Bash on Windows 8.1 I see (at least) two different ways to launch Git Bash: 1) Start Screen -> Type Git Bash -> Press Enter 2) Windows Explorer -> Right Click Folder -> Select "Git ...
Jen S.'s user avatar
  • 755
9 votes
3 answers
5k views

Is there a way to stop “Ctrl+C” from closing a tab when running Git Bash in Console2?

My goal is to have a terminal with Unix commands (e.g. ls instead of dir), color, and working keys in my Windows 7 machine. My current attempt at getting this to work is using Git Bash in Console2. I ...
Eva's user avatar
  • 223
9 votes
5 answers
12k views

How do I disown/detach a process from the Git Bash terminal that come with Git's Windows installer?

I would like to run commands from the terminal (mostly Python servers) and essentially daemonize them. I am running the MinGW terminal "Git Bash" that comes with the Windows installer for Git. ...
burfl's user avatar
  • 191
8 votes
2 answers
45k views

How to sync windows 10 clock to internet from commandline?

I would like to be able to synchronize my windows 10 computer clock when it goes out of sync... From the commandline with 1 command. This solution shows how to do it via settings. https://superuser....
csch0's user avatar
  • 148
8 votes
2 answers
2k views

Rename tab from MinGW-console using ConEmu

I'm using the cmder (ConEmu) with Git Bash-tabs (MinGW) and I want to rename the current tab with a console command. Within a cmd-Tab I can use cmd /c RenameTab "myTabName" but I a need a similar ...
dontpanic423's user avatar
8 votes
1 answer
8k views

SSH suddenly stopped working in git-bash on Windows 10

I have been using git-bash in Windows 10 (Version 10.0.17134.1069) for a year now. Since last week my SSH commands just hangs. It looks like this: The process eats up 12% percent of the CPU and ...
ozkanpakdil's user avatar
7 votes
3 answers
3k views

Can the Windows %PROGRAMFILES(X86)% environment variable be accessed in Cygwin or Git Bash?

In Git Bash and Cygwin, I can easily access the Windows %PROGRAMFILES% environment variable: $ echo $PROGRAMFILES C:\Program Files $ echo ${PROGRAMFILES} C:\Program Files However, due to the ...
AJM's user avatar
  • 384
7 votes
2 answers
3k views

Tab completion for .bat files in Git-for-Windows Bash

Git for Windows installs "Git Bash," a bash shell that works in Windows, which is very nice. It's based on MinTTY, I believe. As well as bash shell scripts, it can also execute Windows batch (.bat) ...
KRyan's user avatar
  • 255
7 votes
4 answers
7k views

How can I get ec2 command run in git-bash?

I installed ec2 command line tools on windows this morning. When I try to run a command ec2-describe-instances in the git bash, I get this output: Exception in thread "main" java.lang....
citizen conn's user avatar
7 votes
2 answers
5k views

Git on Windows without bash

Is it possible to install git on windows without also installing git bash? Now that bash is available on windows I'd prefer to use that and not have so many shells lying around. Is that even a ...
Simon's user avatar
  • 367
6 votes
2 answers
7k views

How to use %LocalAppData% with git bash in Windows?

I want to automate my process of align and signing an APK (an app for Android). I use git bash as terminal inside VSCODE. For this I am concatenating the commands I need into a shell script but I got ...
distante's user avatar
  • 627
6 votes
2 answers
11k views

What is the difference between git-bash.exe and sh.exe in Windows?

I wanted to integrate git bash into IntelliJ, so I've changed the default terminal path to C:\Program Files\Git\bin\sh.exe. After some time I noticed that some commands are not working, for example: ...
Ian Fako's user avatar
  • 163
6 votes
1 answer
4k views

'conda activate" is not working in git-bash shell But it looks well on cmd.exe

I am trying to make the virtual env. on my laptop using cmd terminal, I succeed well. However, I stuck on a git-bash terminal. Do you know what is wrong? Follows are the command I took on git-bash ...
hyungmin Kang's user avatar
6 votes
3 answers
17k views

Install Ansible in Windows, using Git-bash

I am trying to install the Ansible open source automation platform on Windows. There are many guides out there for how to install Ansible using Cygwin (eg. 1, 2). However, I already have Git-Bash ...
edesz's user avatar
  • 173
6 votes
0 answers
4k views

Pacman is not found in msys2

I just installed Git for Windows 2.22.0 which should include pacman, but I get an bash: pacman: command not found and I don't see the pacman executable in /usr/bin.
linden's user avatar
  • 61
5 votes
2 answers
5k views

Git Bash with Windows Terminal prints weird characters instead of newline

I'm on a fresh machine and installed Windows Terminal [Microsoft Store] and Git Bash [latest]. I ran a build script that logs its progress and whenever a newline character appears (maybe others as ...
PentaKon's user avatar
  • 361
5 votes
2 answers
7k views

Installing Anaconda on Git Bash and trying conda activate results in repeated CommandNotFoundErrors

I've recently refreshed my Git Bash and Anaconda installation, and I am trying to run Git Bash from within VSCode with Anaconda. The issue is that whenever I open the integrated terminal from within ...
Daneolog's user avatar
  • 481
5 votes
3 answers
6k views

Git Bash extremely slow start up on Windows

I have read posts similar to this one; it seems my issue is different. I suspect I'm having this issue due to my .bash_profile because when I delete it and open the terminal again it starts up quickly,...
HasanTheSyrian_'s user avatar
5 votes
2 answers
8k views

Is it possible to SSH tunnel on Windows 10 with Git Bash?

I'm trying to forward port 5000 from my local machine to a remote server's port 5000 I'm using the command ssh -L 5000:localhost:5000 root@remote However, when I try to make the following curl ...
user avatar
4 votes
1 answer
3k views

Is shebang necessary in git bash scripts on windows

Shebang is the first line of a bash script telling where the bash script is executed. In Windows git bash scripts, is it necessary? If not, why?
Wasif's user avatar
  • 8,604
4 votes
1 answer
12k views

Git-Bash not running Python3 as expected, hanging issues

I will try to be as descriptive but brief as possible... I have been using GitBash in that past on Win10 successfully. I came back to my Windows machine after not using it for a bit and can't seem to ...
Justin's user avatar
  • 41
4 votes
2 answers
8k views

Conda breaks when activating environment -- CommandNotFoundError: No command 'conda conda'

I've been running Anaconda successfully for a few months on my PC (Win 10) using Git Bash and Anaconda3. However, today I tried to update to the latest version of Anaconda (I don't remember which ...
Kyle Miller's user avatar
4 votes
3 answers
8k views

Git-Bash and WSL have a different directory structure

So I'm currently in the process of configuring and setting up my WSL on my Windows 10 workstation so I can use some very useful command line tools on Windows. Now in both WSL and Git-Bash you have ...
MindSwipe's user avatar
  • 155
4 votes
1 answer
19k views

git add . command not working

git add . is not working it got stuck as you can see the below image. I am building an expo project and the directory structure is in the image. Please help me with this problem. I also tried git add ...
Rajat Verma's user avatar
4 votes
1 answer
4k views

Problems executing perl on git for windows bash

The issue is that perl is installed in my system and bash can see it, however when I try to execute a perl script that includes a module, there's an error. Can't locate Text/CSV.pm in @INC (you ...
ffuentes's user avatar
  • 183
4 votes
1 answer
2k views

Do I need to be concerned using the Git Bash on Windows with Shellshock?

I use the Git Bash on a Windows 8.1 machine. Do I need to be concerned by Shellshock?
BanksySan's user avatar
  • 733

1
2 3 4 5