git-bash

Username and password in command for git push

末鹿安然 提交于 2019-11-27 05:12:04
问题 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

GitBash not outputting to console

妖精的绣舞 提交于 2019-11-27 04:42:40
问题 GitBash suddenly stopped working correctly. I tried uninstalling and reinstalling with no avail. git commands seem to execute, but doesn't show anything in the console. For instance, I can pull, push, init and it works, but nothing shows on the command line. git --version doesn't return anything to the console. However, if I output it to a file with git --version > output.txt , it shows correctly in the file. Also doesn't show the current branch on the command line. Newly reinstalled. Am I

How to upload a project to Github

梦想与她 提交于 2019-11-27 02:28:59
After checking this question I still have no idea how to get a project uploaded to my Git Hub repository. I'm new to Git Hub and I have no idea what to do. I created a Repository but i want to upload my project to it. I've looked on the repository page for an upload button of some kind but I haven't seen anything of the sort. I've looked at the links provided so far but I'm still getting no where. They mention command line, is that Windows command line or Git Bash? Because I can't get either to do anything. I also tried using Git GUI but when I select the folder I want it says that it's not a

Running SSH Agent when starting Git Bash on Windows

南楼画角 提交于 2019-11-27 02:27:09
I am using git bash. I have to use eval `ssh-agent.exe` ssh-add /my/ssh/location/ every time when I start a new git bash. Is there a way to set ssh agent permanently? Or does windows has a good way to manage the ssh keys? I'm a new guy, please give me detailed tutorial, thanks! VonC In a git bash session, you can add a script to ~/.profile or ~/.bashrc ( with ~ being usually set to %USERPROFILE% ), in order for said session to launch automatically the ssh-agent . If the file doesn't exist, just create it. This is what GitHub describes in " Working with SSH key passphrases ". The " Auto

git stash is slow on windows

寵の児 提交于 2019-11-27 00:26:57
问题 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

Can't start foreman in Heroku Tutorial using Python

一个人想着一个人 提交于 2019-11-26 22:38:08
问题 I have been attempting to complete this tutorial, but have run into a problem with the foreman start line. I am using a windows 7, 64 bit machine and am attempting to do this in the git bash terminal provided by the Heroku Toolbelt. When I enter foreman start I receive: sh.exe": /c/Program Files (x86)/Heroku/ruby-1.9.2/bin/foreman: "c:/Program: bad interpreter: No such file or directory So I tried entering the cmd in git bash by typing cmd and then using foreman start (similar to a comment on

Getting ssh-agent to work with git run from windows command shell

泄露秘密 提交于 2019-11-26 22:30:23
问题 I have msysgit installed, with OpenSSH. I am connecting to a gitosis repo. From the git bash, I have created a .profile file that runs ssh-agent (if not already running) each time git bash is opened, using this script SSH_ENV=$HOME/.ssh/environment function start_agent { echo "Initialising new SSH agent..." /usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} echo succeeded chmod 600 ${SSH_ENV} . ${SSH_ENV} > /dev/null /usr/bin/ssh-add; } # Source SSH settings, if applicable if [ -f "${SSH

Winpty and Git Bash

梦想的初衷 提交于 2019-11-26 19:44:54
问题 I had the same issue as Python not working in the command line of git bash, where in Git Bash, when I type Python , it just hangs. However, typing winpty python works perfectly. What exactly is winpty ? Why is the above command useful? 回答1: winpty is A Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs. That is why you need it as described here: The software works by starting the winpty-agent.exe process with a new,

Unicode (utf-8) with git-bash

做~自己de王妃 提交于 2019-11-26 19:17:32
问题 I'm having some trouble getting unicode to work for git-bash (on windows 7). I have tried many things without success. Although, I'm not quite sure what is responsible to for this so i might be working in the wrong direction. It really seems this should be possible as the encoding for cmd.exe can be changed to unicode with 'chcp 65001'. Here are some things I've tried (besides the obvious of looking through the configuration options in the GUI). Setting environment variables in '.bashrc'. I

Bash mkdir and subfolders [duplicate]

走远了吗. 提交于 2019-11-26 18:58:42
问题 This question already has answers here : How to create nonexistent subdirectories recursively using Bash? (4 answers) Closed 3 years ago . Why I can't do something like this? mkdir folder/subfolder/ in order to achive this I have to do: mkdir folder cd folder mkdir subfolder Is there a better way to do it? 回答1: You can: mkdir -p folder/subfolder The -p flag causes any parent directories to be created if necessary. 回答2: To create multiple sub-folders mkdir -p parentfolder/{subfolder1