Questions tagged [git-bash]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Why doesn't ssh-keygen not generate a key?

On Git bash (Windows), I'm trying to create a ssh key but nothing happens when I enter the command ssh-keygen. Note: The same command worked few minutes ago. And I could create a ssh key (with a ...
0
votes
1answer
33 views

Add custom path on specific key press after git command in Git bash

I am looking to reduce the repetitive work. Following is the example, currently, I am using frequently the following command and I want to custom set the directory. I.e git add /pkg/XYZ/123/456/789/...
0
votes
0answers
26 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 ...
0
votes
0answers
45 views

How to set Windows Terminal to open bash at a specific folder?

How can I configure a Windows Terminal profile to open Git Bash, but setting it to navigate to a specific path? I've tried to set --cd=\"D:/path/"" but it does not work: %PROGRAMFILES%/...
0
votes
0answers
29 views

Why do I have a .minttyrc file when I don't have mintty installed?

The minttyrc file is responsible for customization of the mintty terminal. mintty runs on Cygwin. On this machine, I don't have Cygwin. Consequently I shouldn't have mintty, and so I shouldn't have a ...
0
votes
0answers
20 views

git-bash heredoc on Windows for SqlCmd.exe

I have written a script like this: sqlcmd -S server -d database -i <<HERE select db_name() HERE This fails, however with Sqlcmd: '-i': Missing argument. Enter '-?' for help. Any ideas how to ...
1
vote
1answer
78 views

How to see file permissions and ownership in git bash (Windows 10)?

When I do ls -l, all files appear to have the same user, and all appear to have same permissions: regular files have -rw-r--r-- executables have -rwxr-xr-x directories have drwxr-xr-x Regardless of ...
2
votes
1answer
54 views

How to stop scrolling output in git bash (MINGW64) on windows?

I am compiling using g++ and the output scrolls many pages. On Unix/Linux I was able to achieve it using pipeline and "more".
0
votes
0answers
228 views

bash: C:Usersha_haAnaconda3/etc/profile.d/conda.sh: No such file or directory

I am using Windows. Whenever I launch git bash I get the following error message bash: C:Usersha_haAnaconda3/etc/profile.d/conda.sh: No such file or directory I think some of the path separators are \...
1
vote
0answers
157 views

Start Git Bash profile in Windows Terminal from bat file and pass in an executable command to run

I am trying to start 2 applications (client and server of a MERN stack app) in Git Bash using command-line arguments for Windows Terminal. Below given is my command wt -M; new-tab -p "Git Bash&...
0
votes
0answers
53 views

How to launch the WLS shell from a GitBash shell on Windows 10?

GitBash is one of the options one has to operate a Bash environment directly inside Windows. However, there now is the option to use the Windows Linux Subsystem (WLS), that can be launched from the ...
0
votes
1answer
215 views

Windows Terminal with git-sdk autocomplete for git doesn't work

I am using git-sdk in my Windows Terminal. "profiles"/"list" entry for it looks like this: { "guid": "{00000000-0000-0000-ba54-000000000002}", "...
0
votes
1answer
41 views

Decrease disk space requirements for git-annex on Windows

Currently, I am evaluating git-annex to track larger files on disconnected media. After adding files to annex on Windows, I noticed that the disk space doubles as hashed content resides in the workdir ...
0
votes
0answers
111 views

git-sdk bash opens very slow git commands also slow

I recently updated my git-sdk-64 to 1.0.7 because its bash opened very slow, like solid 10-20 seconds from the icon press to the opening. Arguably, it became even slower after update. And now git ...
2
votes
1answer
726 views

Setting background image in Git Bash with Windows Terminal

I have Git Bash running in my Windows Terminal, but I have trouble setting the background image, which is only visible in the right strip of the terminal window (it's cropped, not squished): At first,...
0
votes
0answers
60 views

How can I associate bash command to Git Bash instead of WSL Bash?

I have Git Bash and WSL Bash installed. Currently bash command is associated to WSL Bash. Can I link it to Git bash instead?
1
vote
0answers
163 views

Git Bash Slow Over Network Drive

I'm having issues with Git Bash running slowly over a network drive. Something as simple as cd takes several seconds, moving forwards or backwards in Vim has a few seconds of latency, etc. This does ...
0
votes
0answers
100 views

Git Bash: Windows 10 text is blurry and hard to read

I just set up a Windows 10 box, and the Git Bash terminal is giving me trouble. The output of a git command, like my uncommitted files in red, is blurry (fuzzy) and very hard to read. I found another ...
1
vote
0answers
43 views

Why does my git bash shell show up as a separate tile in my task bar, when running as admin? [closed]

EDIT: Other SE users cannot reproduce this so it's likely an issue with my company's GPO. Holding open until I can send my helpdesk a link to this write-up. I use Git for Windows, on Windows 10. ...
1
vote
2answers
102 views

Opening a file through Git Bash using a particular software (For Windows)

I want to open a file through Git Bash command prompt using a particular software then what is the command for it. Example:- I am in the directory /c/users/user and I want to open a file named text....
0
votes
0answers
49 views

Passing BibteX options in Vim-Latex

My current Latex workflow involves using Mendeley to automatically create .bib files. These bibfiles are stored in a Mendeley directory in my home folder. Because I don't want to have all my projects ...
2
votes
2answers
2k 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: ...
0
votes
0answers
497 views

the input device is not a TTY in git-bash

I'm trying to create this alias in my .bashrc file: alias devopsjoin='docker ps -q -f ancestor=<image name> | { read container; docker exec -it $container zsh; };' I am on Windows and running ...
2
votes
2answers
83 views

How to get the dir name where I ran the command

I have a folder like this C:\repos\3333-new-feature. And from that location, in a git bash terminal, I run a bat file: /c/repo/3333-new-feature $ myBat.bat One of the instructions in the bat should ...
0
votes
1answer
156 views

Git-Bash stop script from running on startup

I used this script to set my Git Bash to start in the same folder no matter where I start it. However, I would like to not run this script on startup; i.e. revert to what happened on startup before I ...
-1
votes
1answer
36 views

How come I'm having trouble cp this file to another directory?

cp fanpage.html path/Desktop I am using this command to cp the fanpage.html file from my prework-about-me directory to my Desktop directory. When I run the exact command I posted here how come it ...
1
vote
1answer
98 views

What does /* next to file names mean in a code editor?

I noticed some files have /* next to them in my code editor (composer.json and style.css. It looks like comment code... What does it mean? EDIT - I am not talking about css comments. Please refer to ...
0
votes
1answer
206 views

How to display local repository content?

I am new to github stuff. Currently using git bash as a CLI to communicate to remote repository I am working on. For now I do comprehend differences in between working directory and local repository ...
15
votes
1answer
38k 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 ...
1
vote
1answer
751 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?
1
vote
1answer
136 views

cURL zip file is not a valid archive

I wrote a script to download a zip file based on some user inputs. The file downloads but cannot be opened by a zip file extractor. Git Bash on Win 10. curl -u user:pwd -k -# -C - "$REQUEST_URL" -o "$...
7
votes
1answer
2k 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 ...
0
votes
0answers
75 views

How to delete empty files with Hexadecimal names on Windows

I have a very vital folder that is being "infested" with unknown files. The 500,000+ files have HEXadecimal Names and most of them are 0 bytes each. This is how the files names look like. : ...
0
votes
0answers
330 views

Ignore delete failed files when using “git clean”

When I use git clean -dfx while the solution is opened in Visual Studio, I got Unlink of file '.vs/MyService/v15/Server/sqlite3/db.lock' failed. Should I try again? (y/n) How do I ignore that in the ...
1
vote
1answer
31 views

Is it possible to cd to an ancestor within a directory tree without knowing how far up I need to go?

I'm writing a script to automate adding, committing, and pushing changes to my submodule and repo. Some submodules are nested further than others and I need to cd back up to the root of the repo. I'm ...
0
votes
1answer
100 views

i just want creat a react app from my vscode with gitbash terminal. but my npm start is showing error

$ npm start npm ERR! path C:\Users\erdai\OneDrive\Desktop\react crash todo\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or ...
0
votes
1answer
438 views

Issues while trying to run python through Anaconda3 from Git Bash

Please can someone help me understand (and resolve) whats going on. I think my problem relates to some kind of path issue or permission issue, But I need help or direction/coaching to resolve this. I ...
0
votes
1answer
1k views

On Git Bash, I get an error `cat: /dev/fd/63: No such file or directory` whenever I run the cd command

I've been trying to find out by this problem is happening, I'm using Windows 10 and this error occurs on Git Bash. Whenever I run the cd command to change the directory, I get the following error: ...
5
votes
2answers
5k 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 ...
0
votes
2answers
13k views

gcc: fatal error: no input files

I wrote this simple line of code and saved it in a file called 'ex.c'. The code is the following (first line is purposely written wrong as it showed up different in the post): "#include < stdio.h &...
1
vote
1answer
1k views

In Windows Command Prompt or Git Bash, how do you open a document or program that has more than one word in the title?

Whenever I try to open a document or program with more than one word in the title with the correct syntax (using the "start" command and putting the document or program name in quotations), it opens ...
1
vote
1answer
213 views

my virtual environment cannot be found

I'm on a PC windows 10 and always open git bash, then source activate my-env and open a jupyter notebook; somehow my-env broke and I get this error: "C:\bld\conda_1565126647711_h_env/etc/profile.d/...
1
vote
2answers
2k 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 ...
3
votes
0answers
1k 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.
1
vote
2answers
76 views

`vim | less` breaks things

This is the best place I found for my question. Running vim | less from inside gitbash will cause it to do something that I can only describe as "breaking." Usually I can get the less ...
0
votes
1answer
507 views

Git Error: bash: command substitution: line 1: syntax error near unexpected token `)'

When I open my GitBash (on Windows 10) I am getting the below error: bash: command substitution: line 1: syntax error near unexpected token `)' bash: command substitution: line 1: `date "+%D %X")' ...
2
votes
1answer
881 views

Windows Terminal Adding git-bash always opens in new terminal window

I was able to figure out how to integrate Git-Bash in windows terminal, but when I select it, it always opens in a new window out side windows terminal. Profile bellow with names removed. { "...
0
votes
1answer
299 views

SCP file copy gets frozen in mid transfer

For some reason I am experiencing an issue with scp/network that file download gets stuck in mid transfer. Usually at the end of the completion, like 90%, 97% or 99%. Files are around 200mb to 1,5gb. ...
3
votes
2answers
4k 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 ...
0
votes
2answers
3k views

Reinstalling Git on Windows

Git bash stopped working for me not sure if i messed up some system variables or something but when i uninstall and try to reinstall i get a series of unable to set system config errors Error 1 ...