3,497 questions
Score of -1
1 answer
93 views
Use existing MSYS2 install for Git-Bash, or any other way to avoid having two concurrent MINGWs
Common situation : I have Git Bash installed, and also MSYS2. Now, Git Bash relies on MinGW-w64, which is also a part of MSYS2 as one of its environments, meaning that I pretty much have MinGW-w64 ...
Score of 1
0 answers
158 views
bash kernel dies in jupyter notebook
I am trying to use a bash kernel in jupyter notebooks and am receiving the following error:
Connection failed
A connection to the notebook server could not be established. The notebook will continue ...
Score of 3
1 answer
79 views
Using tr to replace by "\ " but only gets "\" symbol as an output
When typing the command :
echo 'Hello;World' | tr ';' '\\ '
Output : 'Hello\World'
Expected Output : 'Hello\ World'
Is there a valid way to obtain the expected output ?
Note that when using echo '...
Score of 0
0 answers
312 views
Git for Windows : bash.exe not found
I try to start Git Bash (Git for Windows) on a DOS shell but get the error message:
>C:\APPS\Git\bin\bash.exe
Skipping command-line '"C:\APPS\Git\bin\..\usr\bin\bash.exe"'
('C:\APPS\Git\...
Score of 0
0 answers
113 views
git-bash gettext wrong encoding
I'm trying to translate my bash scripts using the gettext tools but I have a problem where the encoding seems to be wrong.
Let's say I have the following file called fr.po:
# French translations for ...
Score of 2
1 answer
101 views
In Windows Git Sparse Checkout does not work as expected and downloads unwanted files
I have a folder structure in a Git Repo like the following:
.
└── top_level/
├── invalid_file_names/
│ ├── <?>.txt
│ └── <<>>?.txt
└── valid_files/
├── ...
Score of 0
0 answers
65 views
Getting an 'Not a tty' error when running python .exe that generates a QR Code in Git Bash
Failing in GitBash when trying to use python to generate a QR Code. Fails on the print line. Works find on windows device.
Error Message:
Traceback (most recent call last):
File "awsauth.py&...
Score of 1
0 answers
112 views
redirect STDERR in git-bash for Windows (11) not working any more
I have been using a bash script on my Windows environment for a long time to automate certain git commands. With a new Windows 11 installation I get a completely unexpected problem with the script: ...
Score of 1
1 answer
103 views
How do I provide the correct file paths to merge-doc.js in Git config using Git bash in Windows?
I'm trying to use the merge-doc.js script in my Git config for merge driver and mergetool for .docx, but the TortoiseGit helper script that starts a compare in Word using DCOM requires absolute paths ...
Score of 2
2 answers
227 views
Function doesn’t update global array
I wrote a simple quick sort algorithm. When I run it, it echoes the same array back.
#!/usr/bin/bash
arr=(1 8 3 9 4 5 7 2)
partition() {
local low=$1
local high=$2
local pivot=${arr[low]}...
Score of -1
2 answers
173 views
Unable to create a new repository remotely [duplicate]
I am creating several new repositories and I want to automate it for a future product I am building. Got stuck on the first step. The following command works (at least there is no error message):
git ...
Score of -6
1 answer
116 views
How to create new orphan git branch and keep only one folder? [closed]
I tried this
git checkout --orphan newfeature/lk1
Inside I have
A,B,C....
my goal was delete all except the one,A
find . -name A -prune -o -print0 | xargs -0 rm
It did not work for me.
I am using ...
Score of -3
2 answers
181 views
Git switch to branch silently only partially updates working directory when extraneous directories are present [closed]
Git is behaving very strangely by silently failing to update the working directory contents when changing to a branch relative to a remote under certain conditions, e.g. if there is an empty directory ...
Score of 0
0 answers
162 views
VS Code Python extension injects incorrect start up script oh-my-posh variables with shell integration
The task
I'm using oh-my-posh to display extra info in the terminal for PowerShell (v7) and Git Bash.
The problem
When using Windows Terminal I can see that the theme changes are present, but in the ...
Score of 2
1 answer
279 views
Emojis won't show up properly in build logs for Maven Project name on Git Bash
I have a pom file whose name looks similar to this.
<name>Some Name 😊</name>
But when I performed the maven build, I got this instead.
Some Name 🙂
I set my project encoding to utf-8, ...