git-bash

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

妖精的绣舞 提交于 2019-11-28 16:19:01
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. but none of these have worked. P.S.: I use Windows Defender antivirus, and it is NOT making my Bash

How to default to other directory instead of home directory

久未见 提交于 2019-11-28 15:09:19
I am developing on a windows machine. The only place I need for linux command line is Git Bash. The problem is: When I open it, I am in the home directory. I have to change the directory to my workspace, like: cd ../../../d/work_space_for_my_company/project/code_source Can I wrap this in a .sh file so I don't have to hand-type it anymore? This should be simple but I have zero knowledge about Linux command line. I am really appreciated If you can walk me through how to create that .sh file. Just write that line to a file "cd.sh", then do this from your shell prompt: . ./cd.sh Or you can create

sed: unterminated 's' command`

白昼怎懂夜的黑 提交于 2019-11-28 14:14:11
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? 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 ping) it gives the error. Must be special characters in the variable. Thanks guys. 来源: https://stackoverflow

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

我是研究僧i 提交于 2019-11-28 12:07:48
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 variable dialogue and enter 'php' as the variable and C:\wamp\bin\php\php5.3.8 as the value. Is this

Atlassian rainbow

雨燕双飞 提交于 2019-11-28 07:06:02
问题 I just came across a git response in the form of a rainbow, when pushing to my bitbucket repository: Does anybody have a clue what this is related to? The last time they pulled something similar was in solidarity with Supreme Court ruling on gay marriage. Note that this is not a duplicate of Atlassian “logo” after pushing to bitbucket, since that one was in celebration of the Supreme Court ruling on gay marriage. This one is in celebration of the LGBT pride month, June. 回答1: According to

Git add errors: Could not open directory: Permission Denied

孤街醉人 提交于 2019-11-28 06:54:39
问题 I am using windows 10. When I type the command "git add ." in my Git Bash I keeping getting this message as shown below: warning: could not open directory 'AppData/Local/Application Data/': Permission denied warning: could not open directory 'AppData/Local/ElevatedDiagnostics/': Permission denied warning: could not open directory 'AppData/Local/History/': Permission denied warning: could not open directory 'AppData/Local/Microsoft/Windows/INetCache/Content.IE5/': Permission denied warning:

Getting /bin/bash: -c: line 0: unexpected EOF while looking for matching `''

会有一股神秘感。 提交于 2019-11-28 06:06:22
问题 I have a problem with my Gitbash. whenever I am running below drush command I am getting error command : drush @site sqlq "select * from tablename" error : /bin/bash: -c: line 0: unexpected EOF while looking for matching `'' /bin/bash: -c: line 1: syntax error: unexpected end of file I tried to run simple drush commands like drush @site cc all and they are working fine. Is this issue related to system configurations or any environment variable related problem? I tried to run this command in

Bash in Git for Windows: Weirdness when running a command with CMD.exe /C with args

自作多情 提交于 2019-11-28 05:53:10
This is more of an annoyance rather than a problem but I would very much like to understand the semantics here. All I want to do is to run an arbitrary command on a temporary command-prompt session which itself running under a bash session. My success rate is 50/50 as some command works as expected whereas others not so much. I think the problem may lie around arguments not lining up properly (i.e. missing or merged arguments) I'll try to explain what I mean by weird by a series of commands and responses. (I'm trying to get the word test to be printed on the screen.) I'm running these under

git stash is slow on windows

安稳与你 提交于 2019-11-28 04:28:27
On my windows machine git stash has about 3.5 seconds overhead on each invocation, which adds about 7 seconds to my git commit hook. The same command under linux (same machine) takes about 0.01 seconds. The performance issue applies to empty repositories as well. I have tried the following from this thread and this thread : core.fscache is set to true core.preloadindex is set to true gc.auto is set to 256 Setting PS1='$ ' Running cmd in administration mode Running inside cmd.exe instead of git-bash Running GIT_TRACE=true git stash list 16:58:16.844591 git.c:563 trace: exec: 'git-stash' 'list'

Username and password in command for git push

核能气质少年 提交于 2019-11-28 03:44:58
It's possible to clone down a git repository, specifying username and password in the command. Example: git clone https://username:password@myrepository.biz/file.git Is it is possible to also specify the username and password when pushing? So that, for example, running git push origin --all will then output asking for a password. I want this in one command. (I am aware of the ability to set up keys and other solutions, but I want to know if there is a way to just keep using username and password with one command.) I am running Git Bash on Windows 8.1. Yes, you can do git push https://username