git-bash

ZSH auto completion for git takes significant amount of time, can I turn it off or optimize it?

对着背影说爱祢 提交于 2019-12-03 03:42:04
问题 Git's tab autocompletion is useful for small projects, but I'm currently working on two big projects that use git and for these it's worse than useless. Whenever I type, say, git add forms<tab> , git takes 20 seconds or more to find the file (in this example, forms.py), and in this timespan I can't do anything else in the terminal. Is there any way to turn off the autocompletion feature, or somehow make it faster? 回答1: It's not git auto completing the file names, it's your shell. Do you have

How to create a new repo at Github using git bash?

妖精的绣舞 提交于 2019-12-03 03:23:46
问题 How can I create a new repository from my machine using git bash? I followed the below steps: mkdir ~/Hello-World cd ~/Hello-World git init touch README git add README git commit -m 'first commit' git remote add origin https://github.com/username/Hello-World.git git push origin master But I'm getting "Fatal error: did you run update-server-info on the server? " 回答1: You cannot create a repo on github using git bash. Git and github are different things. Github is a platform that let's you host

How to start MingW Console (GitBash) from Command Line on Windows?

点点圈 提交于 2019-12-03 02:59:07
I'm trying to automate my work environment set up using a batch file. I'm stuck at a point where I am not able to start the MingW64 Console from command line. start "" "%ProgramFiles%\Git\bin\sh.exe" --login works fine but it seems to open a different shell window than that I am looking for. I'll explain this with pictures. What it opens is a default cmd style window with bash integrated. This window isn't even resizeable What I want is I was trying to use the command start "" "%ProgramFiles%\Git\git-bash.exe" --login -i -c /bin/bash but it seems to quickly close the shell after opening it. If

How can I change the user on Git Bash?

醉酒当歌 提交于 2019-12-03 02:01:48
问题 I want to sign out an actual user so I can sign in with another user. What I see in Git bash is: MINGW64 ~/Documents/NetBeansProjects/ConstructorJava (master) git push -u origin/master remote: Permission to Fre1234/ConstructorJava.git denied to Fre123. Fatal: unable to access https://github.com/Fre1234/ConstructorJava.git/": The requested URL returned error: 403 回答1: Check what git remote -v returns: the account used to push to an http url is usually embedded into the remote url itself. https

How do I avoid typing “git” at the begining of every Git command?

孤街浪徒 提交于 2019-12-03 00:29:22
问题 I'm wondering if there's a way to avoid having to type the word git at the beginning of every Git command. It would be nice if there was a way to use the git command only once in the beginning after opening a command prompt to get into "Git mode" . For example: git> After which every command we type is by default interpreted as a Git command. In a way similar to how we use the MySQL shell to write database commands: mysql> This will save me from having to type git hundreds of times a day.

Running .sh scripts in Git Bash

孤人 提交于 2019-12-02 21:41:19
I'm on a Windows machine using Git 2.7.2.windows.1 with MinGW 64. I have a script in C:/path/to/scripts/myScript.sh . How do I execute this script from my Git Bash instance? It was possible to add it to the .bashrc file and then just execute the entire bashrc file. But I want to add the script to a separate file and execute it from there. Let's say you have a script script.sh . To run it ( using Git Bash ), you do the following chmod +x script.sh ./script.sh You can change the chmod to the executable permissions that you want. Those can be found here . Note: The chmod only has to be run once .

How do I change the directory in Git Bash with Git for Windows?

旧街凉风 提交于 2019-12-02 20:21:18
How would I change to the directory C:/Users/myname/project name in Git Bash? Stefan Näwe cd /c/users/myname/project\ name Beware that ls / , or typing cd / followed by Tab-completion, might not show the existence of this folder, but cd /c will still work. Also note that pwd (to print the current working directory) might show something like /bin , but this might not be the actual working folder for commands such as git clone , which might use the folder from which Git Bash was started. If the you know how many levels up from your current working directory, you could use cd ../project/name to

ERROR : No emulator images (avds) found thrown on windows 8 while opening emulator

放肆的年华 提交于 2019-12-02 20:05:07
I am having one cordova application made in ionic framework i want to test it in emulator som fired command ionic emulate android and it threw following error Error coming on Git Bash command prompt while running command ionic emulate android. Error: c:\Users\work\biziHiveMobile\platforms\android\cordova\node_modules\q\q.js:126 throw e; ^ ERROR : No emulator images (avds) found. 1. Download desired System Image by running: c:\Users\work\AppData\Local\Android\android-sdk\tools\android.BAT sdk 2. Create an AVD by running: c:\Users\work\AppData\Local\Android\android-sdk\tools\android.BAT avd HINT

How to use Windows network paths with Git Bash

好久不见. 提交于 2019-12-02 19:48:24
Paths to network resources are denoted in Windows with the \\servername\share\path\to\folder syntax. How does one use such a folder within Git Bash, which uses Unix-style paths? Actually just cd //servername/share/path/to/folder where //servername/ is followed by at least one shared folder. You need to associate a drive letter to the network path you want to use. To do this, execute the following command in the Windows cmd shell: pushd \\servername\share\path\to\folder The next prompt will carry the assigned drive letter, e.g. Z:\path\to\folder . Now, open Git Bash (it will not work with an

Git Windows Disable password prompt UI but get password prompt from shell

北慕城南 提交于 2019-12-02 18:09:23
In git bash for windows, the username and/or password is asked in a separate UI popup prompt like below. On Hitting Cancel you get the below shell based prompt, where the same username can be input. Is there a way I can disable these prompts? I still do want to enter my username and password however instead of the UI based prompt, i want to enter it through the shell based prompt. Using suggestions from this does not help. How to undo git config --system core.askpass git-gui--askpass Try to blank the variable core.askPass globally (in your config-file) $ git config --global core.askPass "" or