git-bash

-bash: __git_ps1: command not found

痴心易碎 提交于 2019-11-27 11:12:05
I tried to install Ruby 2.0. My command line urped and now looks like the following: -bash: __git_ps1: command not found [11:58:28][whatever@whatever ~]$ I have not a clue how to get rid of the __git_ps1 command not found error. I've searched my .bash_profile and my .bashrc to see if it's trying to set a variable or something and am not seeing anything. The only place I can find git_ps1 mentioned is in ~/.dotfiles/.bash_prompt. I replace the content of that file completely, logout and log back in and it fixes nothing. I saw this , but I'm pretty new to command line so I just confused myself.

Set an environment variable in git bash

妖精的绣舞 提交于 2019-11-27 10:41:18
问题 When I punch from the windows gitbash command line: set $HOME = c and do : echo $HOME It does not set it to c ? How can I change/set the value of an environment variable? 回答1: A normal variable is set by simply assigning it a value; note that no whitespace is allowed around the = : HOME=c An environment variable is a regular variable that has been marked for export to the environment. export HOME HOME=c You can combine the assignment with the export statement. export HOME=c 回答2: If you want

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

会有一股神秘感。 提交于 2019-11-27 09:57:37
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? Himanshu Install Git from https://git-scm.com/download/win Open Visual Studio Code and press and hold Ctrl + ` to open the terminal. Open the command palette using Ctrl + Shift + P . Type - Select Default Shell Select Git Bash from the options Click on the + icon in the terminal window The new terminal now will be a Git Bash terminal. Give it a few seconds to load Git Bash You can now toggle between the different terminals as well

Git Bash (mintty) is extremely slow on Windows 10 OS

情到浓时终转凉″ 提交于 2019-11-27 09:46:10
问题 I installed Git on my Windows 10 a couple of months ago. It worked fine for some time. But now, it's running so slow. The git status command takes 7 seconds to execute, and git stash takes many minutes for stashing (even if there is nothing to stash). Also, I would like to point out that git status prints the result instantaneously, but I can not enter a new command for a few seconds as shown in the image below. I have tried surfing the net for solutions to my problem like this, this, etc.

sed: unterminated 's' command`

会有一股神秘感。 提交于 2019-11-27 08:24:47
问题 I'm writing a nice regex to replace some IP's in a text file. sed -r "s/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/${APP_IP}/g" /path/to/my/file However it is giving: sed: -e expression #1, char 49: unterminated 's' command I need the double quotes otherwise it replaces desired strings with the literal variable name: ${APP_IP} What am I missing? 回答1: SOLVED: Seems to be working when I set the variable $APP_IP manually to the IP under test. If I capture the variable from the output (of a

problem while i was pushing my code to github.com, someone has got main access to github from my PC,

一笑奈何 提交于 2019-11-27 07:36:46
问题 $ git push -u origin master remote: Permission to ravi5026/web-server.git denied to vnaresh007. fatal: unable to access 'https://github.com/ravi5026/web-server.git/': The requested URL returned error: 403 where can I delete vnaresh007 and put my own access. My credentials are set properly. 回答1: Check your git credential helper : this is what has cached the wrong credentials. git config credential.helper On Mac, just open your keychain access->search for github.com related file->and edit

How to properly set PHP environment variable to run commands in Git Bash

假装没事ソ 提交于 2019-11-27 06:52:37
问题 There are a few similar questions as this throughout the site, but none of them are giving me the answer I'm looking for. What I'm trying to do is install Composer via Git Bash on a Windows machine that has WAMP. I'm using the following command: curl -s http://getcomposer.org/installer | php This is not working, as 'php' is not recognized. So I looked into the problem and I realized that Windows does not know what 'php' is, and I need to set an environment variable. I go into the environment

Can not activate a virtualenv in GIT bash mingw32 for Windows

雨燕双飞 提交于 2019-11-27 06:40:15
When I try to activate my virtualenv from GIT bash mingw32 I do not get the expected response. NOTE: py is the folder for Python projects in my Google Drive folder. hy is the virtualenv folder that was made when I ran virtualenv --distribute hy . s3z@s3z ~/Google Drive/py/hy $ Scripts/activate So you see, there is no expected (hy) that appears before s3z@s3z ~/Google Drive/py/hy s3z@s3z ~/Google Drive/py/hy $ Scripts/activate.bat Scripts/activate.bat: line 1: @echo: command not found Scripts/activate.bat: line 4: syntax error near unexpected token `(' Scripts/activate.bat: line 4: `if not

Cannot push to Git repository on Bitbucket

假如想象 提交于 2019-11-27 05:49:58
I created a new repository and I'm running into a strange error. I've used Git before on Bitbucket but I just reformatted and now I can't seem to get Git to work. After doing a commit, I had to add my email and name to the globals, but then it committed just fine. When I try to use the command git push origin master it doesn't work. I get this message: $ git push origin master Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. I'm at a loss here. My friend whom I'm sharing this repository

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

放肆的年华 提交于 2019-11-27 05:46:54
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 --help'. ... at which point I am forced to enter my username and password. After doing so, I am presented with the same error message again, followed by the output from git push . Here is the contents of my .gitconfig file: [user] name = myusername email = myusername@myemaildomain.com [credential] helper = cache To be clear, after I installed Git and