Questions tagged [git-bash]

Git Bash is a bash shell bundled with Git for Windows that enables the use of Git from the command line.

Git for Windows provides a Bash emulation environment used to run Git and a small set of Unix tools from the command line.

3416 questions
1
vote
1 answer

bash how to exec a command not exit?

I had a command: "D:\Program Files\Git\bin\bash.exe" --login -c "git log -2" but when I exec the such shell script, it print the result and quick exit. I search bash…
lyq
  • 98
  • 7
1
vote
1 answer

"npm install ejs --save" not working on GitBash but works when used on windows powershell

npm install has successfully worked on every other package I have installed, but for some reason I always get this error on git bash when downloading ejs. I was able to "npm install ejs" successfully on windows power shell. Any ideas on why this…
1
vote
2 answers

How to escape commas inside commit title/subject in Git logs?

I'm using the following to create a CSV file of my commit history to be seen in Microsoft Excel. git log --since='last month' --pretty=tformat:"%an, %s" --author=Jorge > "Jorge.csv" The problem is that some commit subjects have commas in them. So…
Jorge Luque
  • 435
  • 1
  • 4
  • 17
1
vote
1 answer

Git Bash adds local Git Path to Arguments beginning with "/"

For illustration, here is a very basic Javascript file, reduced to the bare essentials, let's say "test.js": console.log(process.argv.slice(2)); So this line should only output my command line arguments. That's it - no magic at all until here.…
Drunda Nibel
  • 101
  • 6
1
vote
0 answers

git bash terminal overwriting text while using mongoDB

I am working with mongoDB through a git bash terminal but am unable to insert text between previously written text without overwriting it. This does not happen with the windows command line terminal nor in the VS code terminal. is there a setting…
Jonas
  • 43
  • 6
1
vote
1 answer

How to add a maven child module to .gitignore

I'm trying to set up a script to automatically rebase changes from the development branch to branches containing Maven child modules. The way this project is setup is that the development branch contains the parent module. All changes go to that…
SVill
  • 331
  • 5
  • 22
  • 55
1
vote
1 answer

Not able to connect to bitbucket using SSH keys, but connecting through SourceTree is working

I have generated SSH keys using PuttyGen (priavte key is saved as "private.ppk" under .ssh folder). I have added the public key to my organisation Bitbucket's SSH key section. If I try to do any git operations using SourceTree, its working fine. But…
ljs
  • 495
  • 1
  • 8
  • 23
1
vote
1 answer

How to stop the application running using the "Gradle application plugin"?

I have a multi-module java application. I have to run each module separately. I use gradle application plugin for runnig module. The application runs on Windows 10, Intellij Idea 2019.2.4, Java 11, gradle 5.6.4 It's execution stuck's on 90%, but it…
donquih0te
  • 597
  • 3
  • 22
1
vote
2 answers

Decoding a base64 encoded random on MinGW not working

I am trying to make a bash script work on MinGW and it seems the shell is not able to decode something like the following. t=$(openssl rand -base64 64) echo "$t" | base64 --decode Resulting in, Ԋ7▒% ▒7▒SUfX▒L:o
Starx
  • 77,474
  • 47
  • 185
  • 261
1
vote
1 answer

Visual Studio Code cannot fin Git-bash

I want to add git-bash to Visual Studio Code. In the normal Terminal I can type where.exe git and git --version. It shows me the right output. But when I try to open a default shell in visual studio code it can not find the git terminal. So I…
thecode
  • 87
  • 2
  • 12
1
vote
1 answer

Basic Bash script results in "edge.sh: line 13: npm: command not found" found issue here but it didn't resolve

The following simple script is apparently not so simple. The entire script appears to work properly until I get to the npm command. I have looked at the numerous threads here, but none of the solutions fix the issue. Each of the scripts is kicked…
1
vote
2 answers

How to delete local git branch with weird character in branch name

I'm not sure how it happened, but I somehow created a local git branch with a strange character in the branch name. When I type git branch, one of the branches listed is myBranch. I want to delete this branch, but when I go to delete the…
Scott Greenfield
  • 2,788
  • 2
  • 22
  • 21
1
vote
1 answer

Is there something i can do the changes and reflect in all the local branches without pushing/Commiting

I deleted some files in my local and i shouldn't push these changes. Now i want these changes in the local when i switch the branch. Is there a way to do that. I tried git stash and git pop. But this should be done everytime i do a switch between…
santosh
  • 21
  • 4
1
vote
1 answer

Git-Bash, how to modify environment variable

I have an environment variable which contains: C:\\Users\\u49100\\OneDrive\\Documents\\CA20-4021_BUILD_1.0.876\\Name\\sc_app I want to modify the environment variable in a script stripping: C:\\Users\\u49100\\ So the result can be assigned…
SPlatten
  • 5,334
  • 11
  • 57
  • 128
1
vote
3 answers

How do I start using make in git bash

Straight up new to the whole thing, i need to start using make and I dont know where to type my make program: main.o funcs.o g++ main.o funcs.o -o program make main.o: main.cpp funcs.h g++ -c main.cpp make funcs.o: funcs.cpp funcs.h …
fatlady98
  • 11
  • 2