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
1505
votes
20 answers

Ignoring directories in Git repositories on Windows

How can I ignore directories or folders in Git using msysgit on Windows?
sf.
  • 24,512
  • 13
  • 53
  • 58
705
votes
10 answers

Various ways to remove local Git changes

I just cloned a git repository and checked out a branch. I worked on it, and then decided to remove all my local changes, as I wanted the original copy. In short, I had to do the following two commands to remove my local changes git checkout . git…
spiderman
  • 10,892
  • 12
  • 50
  • 84
531
votes
19 answers

Adding Git-Bash to the new Windows Terminal

I'm trying to add a new terminal (Git Bash) to the new Windows Terminal. However, I can't get it to work. I tried changing the commandline property in the profiles array to git-bash.exe but no luck. Does anyone have an idea how to get this to work?
Mendy
  • 7,612
  • 5
  • 28
  • 42
530
votes
25 answers

Git fatal: protocol 'https' is not supported

I am going through Github's forking guide: https://guides.github.com/activities/forking/ and I am trying to clone the repository onto my computer. However, running the command: $ git clone https://github.com/./Spoon-Knife.git Cloning into…
Hank Lin
  • 5,959
  • 2
  • 10
  • 17
493
votes
31 answers

How do I use Bash on Windows from the Visual Studio Code integrated terminal?

Visual Studio Code on Windows uses PowerShell by default as the integrated terminal. If you want to use Bash from Visual Studio Code, what steps should be followed?
Mahade Walid
  • 9,404
  • 5
  • 17
  • 25
376
votes
15 answers

Git for Windows: .bashrc or equivalent configuration files for Git Bash shell

I've just installed Git for Windows and am delighted to see that it installs Bash. I want to customise the shell in the same way I can under Linux (e.g. set up aliases like ll for ls -l), but I can't seem to find .bashrc or equivalent configuration…
iftheshoefritz
  • 5,829
  • 2
  • 34
  • 41
363
votes
21 answers

Python not working in the command line of git bash

Python will not run in git bash (Windows). When I type python in the command line, it takes me to a blank line without saying that it has entered python 2.7.10 like its does in Powershell. It doesn't give me an error message, but python just doesn't…
Caroline Morris
  • 3,631
  • 3
  • 10
  • 5
333
votes
15 answers

How to change folder with git bash?

My default git folder is C:\Users\username\.git. What command should I use to go into C:/project?
Sam Mitchell
  • 3,622
  • 3
  • 14
  • 11
331
votes
22 answers

git: 'credential-cache' is not a git command

I followed these instructions to the letter, including the part about password caching. It seems like the instructions are wrong, because every time I git push origin master I get this error: git: 'credential-cache' is not a git command. See 'get…
Big McLargeHuge
  • 14,841
  • 10
  • 80
  • 108
299
votes
26 answers

How do I change the default location for Git Bash on Windows?

I am using Git on Windows 7 and access my repositories through Git Bash. How can I change the default location that Git Bash opens in a convenient folder when I start it? It's somewhat time consuming to navigate to htdocs, and then a specific…
Alex Waters
  • 4,130
  • 3
  • 24
  • 31
293
votes
27 answers

How to upload a project to GitHub

After checking How can I upload my project's Git repository to GitHub?, I still have no idea how to get a project uploaded to my GitHub repository. I created a repository and want to upload my project to it. I've looked on the repository page for an…
jampez77
  • 5,012
  • 7
  • 32
  • 52
234
votes
35 answers

Git bash Error: Could not fork child process: There are no available terminals (-1)

I have had up to 8 git bash terminals running at the same time before. Currently I have only 2 up. I have not seen this error before and I am not understanding what is causing it. Any help would be appreciated! Picture attached:
A. Petrizza
  • 3,202
  • 2
  • 15
  • 24
230
votes
31 answers

GitHub - fatal: could not read Username for 'https://github.com': No such file or directory

I have the following problem when I try to pull code using git Bash on Windows: fatal: could not read Username for 'https://github.com': No such file or directory I already tried to implement the accepted solution provided here: Error when push…
noobie-php
  • 6,817
  • 15
  • 54
  • 101
225
votes
13 answers

How to set aliases in Git Bash for Windows?

How to alias commands in Git Bash for Windows downloaded from git-scm? I mean Bash commands, not Git. I’m on Windows 7. Edit: Writing aliases in .bashrc file (as suggested by @gturri) not adding it in console.(after system reboot)(I have never…
216
votes
12 answers

Change drive in git bash for windows

I was trying to navigate to my drive location E:/Study/Codes in git bash in windows. In command prompt in order to change drive I use E: It returns an error in git bash. bash: E:: command not found. How do I change my current directory location…
Shubham Khatri
  • 270,417
  • 55
  • 406
  • 400
1
2 3
99 100