Questions tagged [git-bash]
The git-bash tag has no usage guidance.
187
questions
0
votes
0
answers
26
views
How do I do math inside an ffmpeg/youtube-dl command or use -to while having -ss before -i
Using youtube-dl and ffmpeg I've got downloading part of a youtube video working fine thanks to this question
ffmpeg -ss 60 -i $(youtube-dl -g -f 18 "https://youtu.be/oHg5SJYRHA0") -t 5 -c ...
0
votes
0
answers
12
views
map alt+delete in git-bash inputrc
Does anyone know how to bind key combinations with Alt in inputrc in git-bash?
I want to map a key combination Alt+delete to kill-word, but when I press Ctrl+V and Alt+delete to see what characters it ...
0
votes
2
answers
29
views
is it feasible to mute the extra connection info for git-bash on windows?
Assume I have a working http-server running on example.com:8080
On ubuntu, this command
$curl http://example.com:8080/
gives
<h1>hello</h1>
while git-bash on windows gives extra ...
1
vote
1
answer
116
views
The Windows command line shows my GPG keys, but git bash does not?
I installed GPG4Win and Kleopatra on my Windows 10 system, and imported my public and private key files that were created on another machine. My goal is to sign my commits in Github using these keys (...
1
vote
1
answer
99
views
Can the Windows %PROGRAMFILES(X86)% environment variable be accessed in 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 ...
0
votes
1
answer
914
views
Set a Windows environment variable from within Git Bash
Is it possible to set an actual Windows environment variable from within the Git Bash for example? I know that you can set environment variables via the Git Bash in general with e.g.
FOOBAR=foo; ...
0
votes
0
answers
18
views
Git sshCommand per remote as opposed to per repo/core
Currently, it's possible to specify an sshCommand per repo/core.
Any ideas on how this can be achieved?
I've already tried:
[remote "origin"]
sshCommand = ssh -i $(echo $PWD)/.ssh/...
1
vote
1
answer
78
views
git-bash.exe and bash.exe show different compiler version and paths
When I start git-bash.exe by, for example, selecting "Git Bash Here" option and check my compiler version and path I receive the following output:
$ g++ --version
g++.exe (Rev2, Built by ...
1
vote
0
answers
51
views
Using `git gui` with `git submodules foreach`
I have a git repository with a number of submodules that are very similar. This means that any change which is done to one of them is typically done in similar way to the other submodules.
Therefore a ...
0
votes
1
answer
21
views
Unable to change cached username during git clone
I am trying to clone an Azure Git Repository from Git Bash, but it keeps asking only for the password, but I need to change the username also to authenticate correctly. I have tried removing all the ...
0
votes
0
answers
79
views
Cannot reinstall Git after new PC move
This is similar to my previous question Cannot Reinstall VS Code After New PC Move
I tried to uninstall Git using Program and Features but cannot, since the uninstall file is not located on this drive ...
0
votes
0
answers
20
views
How to specify which Chrome version (canary or regular) 'start chrome' opens (windows, git bash)
When I run start chrome www.google.com form a Git Bash terminal on Windows 10, Chrome Canary get openend. How can I specify that I want to open the regular version of Chrome?
0
votes
0
answers
10
views
Gitbash procedes to the command handling after its terminated
I have noticed that my gitbash is acting pretty wierd. I have set up a SSH key to my gitlab and when I am trying to do git push origin {branch} it it just freezes the command line and does nothing. ...
0
votes
1
answer
111
views
Git Bash not using the source value specified in windows terminal settings
Until yesterday my settings.json for Windows Terminal has this profile for Git Bash:
...,
"defaultProfile": "{my_guid}",
"profiles":
{
"defaults": {},
&...
0
votes
0
answers
53
views
FTP upload begins and then drops abruptly
I am running the following curl command to upload files using git-bash from two Windows 10 machines (Client A and Client B) to a Windows Server (Server X).
curl --continue-at - \
-T /path/to/...
0
votes
0
answers
60
views
How to start cmd with command from git bash
I want to start cmd with command from git bash.
When I try following commands only cmd will be opened but the command is not executed and simply ignored.
start cmd /c <command>
or
start cmd /k &...
0
votes
0
answers
31
views
How could I do a list from an AWS account listing all running instances?
I'm using AWSCLI at Windows 10 Professional with GitBash. I need to have a list of all running AWS instances by account. Will start doing in an account to make a list to populate the public keys from ...
0
votes
1
answer
44
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/...
3
votes
1
answer
923
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
0
answers
114
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%/...
2
votes
1
answer
1k
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 ...
3
votes
1
answer
227
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
0
answers
419
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
0
answers
260
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
1
answer
248
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
2
answers
629
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
1
answer
73
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 ...
2
votes
1
answer
1k
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
0
answers
163
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?
2
votes
0
answers
297
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
0
answers
188
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
0
answers
134
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
2
answers
280
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
0
answers
82
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 ...
5
votes
2
answers
5k
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:
...
1
vote
2
answers
285
views
Shift-arrow keys send ABCD in Git Bash on Windows 10
My git bash isn't working. It's probably some setting I tampered with and I don't remember what it is. I don't know why Shift-left and Shift-right arrow don't select text but send D and C characters. ...
2
votes
2
answers
247
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
1
answer
323
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
1
answer
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
1
answer
871
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
1
answer
1k
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 ...
18
votes
2
answers
52k
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 ...
2
votes
1
answer
1k
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
1
answer
235
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
1
answer
4k
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
0
answers
107
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.
:
...
1
vote
0
answers
554
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
1
answer
37
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
1
answer
118
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
1
answer
526
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 ...