git-bash

How to get irb and rails console to work properly in gitbash?

[亡魂溺海] 提交于 2019-12-07 08:10:34
问题 I'm using gitbash ver 2.9.0, 64-bit, on Windows 7. It uses mintty version 2.0.3. The gitbash shell most of the time seems to work fine. You can use the arrow keys, etc, as with any bash shell and they perform as expected, being able to scroll through prior commands, etc. However, when using irb or rails console (which runs irb ) it is very flakey. Rather than scroll through prior commands, the up arrow just moves the cursor up the screen and enters what are probably up arrow control codes

Can not use command telnet in git bash

一曲冷凌霜 提交于 2019-12-06 22:32:45
问题 I try to use the command telnet in Git Bash, but it shows this error: bash:telnet: command not found My operating system is Windows 10. Any idea is appreciated. 回答1: That's because telnet is not provided with git. In windows, you need to go to control panel, programs, turn windows features on/off and enable the telnet client. 回答2: To add on to @lostbard's answer and @signonsridhar's comment, telnet utility need to be invoked with winpty to work on git bash. Example: MINGW64 ~ $ which telnet

Git when used with Mac and Windows simultaneously gives unnecessary conflicts

喜夏-厌秋 提交于 2019-12-06 15:37:13
I have a git repo and I generally work on it via my mac laptop. I had also cloned the repo on my windows laptop (using git bash and cygwin ) earlier, everything was fine, but today when I took a git pull I got several merge conflicts though I had no local changes in my windows laptop. I think it may be that the folders in mac use / (forward slash) and in windows \ (backward slash) but I am not sure. Can anyone tell me why this happened and how to resolve this? When working on the same repository from different operating systems you should define appropriate line endings on the repository level

How to Install GNU Parallel on Windows 10 using git-bash

我们两清 提交于 2019-12-06 12:42:12
Has anyone been able to successfully use GNU Parallel on Windows 10 with git-bash? Is it possible? - If so, how? Background: I'm having trouble installing GNU Parallel and using it, and it got me thinking - maybe git-bash is holding me back? I'm sure if I installed Ubuntu through WSL I wouldn't have any problems running GNU Parallel. But I wanted to know if I could do this in git-bash first. I just installed git-bash on a Microsoft Windows 10 machine and had no problems installing GNU Parallel. It is by no means well tested on git-bash, but basic functionality clearly works. I'm having trouble

Permission denied when pushing file to remote

做~自己de王妃 提交于 2019-12-06 11:38:02
问题 I previously used git bash for local repository. I have connected to a GitHub account and I always pushed my files without any problem. Later, I have uninstall the bash and reinstall again with new user and email. Now when I try to push the file to remote I got an error: Permission to SyedMiraj/SpringSecurityWithTicketBooking.git denied to biid-sua. unable to access 'https://github.com/SyedMiraj/SpringSecurityWithTicketBooking.git/': The requested URL returned error: 403 I have tried and

How to pass an argument with space from bash script to bash script?

旧巷老猫 提交于 2019-12-06 09:13:37
问题 I have a script the manipulates data, creates arguments and sends them to a second script. One of the arguments contains a space. script1.sh: args=() args+=("A") args+=("1 2") args+=("B") . script2.sh ${args[@]} script2.sh: for f in "$@" do echo f=$f done I'd like to get "1 2" as single argument, but receive them separately: f=A f=1 f=2 f=B I tried also converting the input in script2 to list in=($@) and iterating over it using for f in ${in[@]} but got the same result. So, the problem might

How to push to GitHub using Git Bash?

送分小仙女□ 提交于 2019-12-06 09:00:54
问题 Whenever I need to push my new local commits to GitHub I use the Windows GitHub desktop application. I open it up and click the sync button. I want to be able to do it from the Git Bash command line. I think the command I want to use is: git push origin master but when I do that I get some sort of invalid username error. I tried this: https://stackoverflow.com/a/20871910/280319 but when I do that and git push origin master I get another error saying git@github.com:user/repo.git is an invalid

Why does Git Bash not display my PHP strings correctly?

有些话、适合烂在心里 提交于 2019-12-06 07:16:48
Here is an example: PHP: <?php echo "ção"; ?> Git Bash: $ php a.php ├º├úo Note: I'm writing a text-console application for Windows. VonC The bash console has changed with the more recent msys2-based (64-bits) Git For Windows 2.3.5 The OP reports: I went ahead and uninstalled msysgit and installed git-for-windows and the problem is solved, although the Git Bash is a little different.. That more recent version of Git For Windows includes all the latest utf-8 support improvements and a bash 4.3.33 2013 (vs. a bash 3.1.20 2005) 来源: https://stackoverflow.com/questions/29758614/why-does-git-bash-not

Python script runs in PyCharm but not Git Bash

扶醉桌前 提交于 2019-12-06 04:25:37
Say I've got a arbitrarily big, modular Python 2.7 codebase: project ↳ docs ↳ etc ↳ package ↳ module1 ↳ submodule1 ↳ subsubmodule1 ↳ __init__.py ↳ subsubmodule2 (... and so on) ↳ __init__.py ↳ submodule2 ↳ subsubmodule1 ↳ __init__.py ↳ subsubmodule2 (... and so on) ↳ __init__.py ↳ submodule3 (... and so on) ↳ __init__.py ↳ module2 ↳ submodule1 ↳ __init__.py ↳ submodule2 (... and so on) ↳ __init__.py ↳ __init__.py ↳ module3 (... and so on) ↳ __init__.py ↳ __init__.py ↳ test project is the root folder - it's a PyCharm project and it's not a module. project\package is the root Python module for

Git diff fails on file with underscore in path

╄→гoц情女王★ 提交于 2019-12-06 03:30:44
I'm running Windows 7, and I have the latest version of git (2.7.2.windows.1). I previously used Windows PowerShell as my terminal for git operations, with no issues. Recently, I decided to switch to Git Bash, but I'm having one major issue. My project has a directory (within which are many subdirectories) whose name is simply an underscore. Whenever I try to run git diff on a file within that directory, I get the following error: $ git diff _/css/templates/jquery.tag-editor.css fatal: Invalid object name '_C'. As far as I know, an underscore is a perfectly valid character in a file/directory