git-bash

Command to clear the Git Bash screen

与世无争的帅哥 提交于 2019-12-31 08:08:09
问题 Is there any command in Git, that clear the screen. for example in window command line after execute a lot of code, if you type cls, then it will clear all the previous code. so i want the same type of functionality in Git. so can anybody will tell me the command name. 回答1: Actually you are looking for a Unix user environment command clear or you can use the keyboard shortcut ctrl+l http://en.wikipedia.org/wiki/Clear_(Unix) To clear entire command history in Git Bash. history -c 回答2: try

Git Bash mysql blank

谁都会走 提交于 2019-12-31 08:01:32
问题 I've installed Git (bash?) from www.git-scm.com I also have a working installation of MySQL. I'm using windows 8.1. The path to my mysql bin directory IS in my path environment variable, and the mysql service IS running. If i open cmd.exe and type in mysql -u root then it logs me in successfully, I get the "welcome to mysql monitor" message, and i can start typing sql away. However in Git bash, if I type in mysql -u root then it just starts a new blank link and doesn't do anything. If i type

After updating conda I get a CommandNotFoundError for conda

我是研究僧i 提交于 2019-12-29 07:00:30
问题 After updating conda I can no longer run commands such as conda list , I now see the following error when I try a conda command: CommandNotFoundError: No command 'conda conda' The conda update was performed like so: $ conda update -n base -c defaults conda Collecting package metadata: ...working... done Solving environment: ...working... done ## Package Plan ## environment location: C:\home\miniconda added / updated specs: - conda The following packages will be downloaded: package | build ---

Does anyone know how to run the scala executable in Git Bash shell?

余生颓废 提交于 2019-12-25 12:00:06
问题 I have installed Scala on my Windows 7 system. When I run "scala -version" from the Windows command prompt, I get: Scala code runner version 2.11.4 -- Copyright 2002-2013, LAMP/EPFL When I run "scala -version" from a Git Bash shell, required by Swagger and other frameworks, I get: Error: Could not find or load main class Files Does anyone know how to run the scala executable from a Git Bash shell? 回答1: I'm guessing that you've installed Scala on C:\Program Files (x86) or C:\Program Files . As

Gitlab have an error: remote unpack failed: eof before pack header was fully read

為{幸葍}努か 提交于 2019-12-24 19:33:23
问题 Does anyone encounter this error in Gitlab and know how to fix it? $ git push origin development.XxXx Enter passphrase for key '/u/.ssh/id_rsa': Enumerating objects: 16318, done. error: remote unpack failed: eof before pack header was fully read error: failed to push some refs to 'git@gitlab.com:Project/GitName.git' I check in the forum with this link error: remote unpack failed: eof before pack header was fully read but it doesnt fully address my problem; because i dont have any fatal:

How done with git fetch, checkout and pull with one command line?

三世轮回 提交于 2019-12-24 18:31:05
问题 Every time I run 3 commands when I need to test my team member code on local. Like that: git fetch remote_name branch_name git checkout branch_name git pull origin master or git fetch remote_name branch_name && git checkout branch_name etc... Because normally after fetch it we always checkout into it than we need pull from origin master. If we can run one command to done all those step it will faster. Does git has a command to fix that? 回答1: If you use this combination of commands often, you

python logging to stdout in git bash

只愿长相守 提交于 2019-12-24 14:33:25
问题 I have a python script with logging that outputs to stdout logger = logging.getLogger() ch = logging.StreamHandler(sys.stdout) ch.setLevel(v_level) formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') ch.setFormatter(formatter) logger.addHandler(ch) It works just fine when I run my script on my linux box, but when I run the script in git-bash on windows, there is no output to the console. Any thoughts? 回答1: Going by the information in this question, it looks like this

GIT pre-commit hook which searches non-UTF-8 encodings among modified/added files (and rejects commit if it finds any)

南笙酒味 提交于 2019-12-24 10:24:53
问题 I'm using Git for Windows (and TortoiseGit). My goal is to prevent commits which have at least one non-UTF-8 file among modified/added. Enumerating modified/added files: I've found the following code { git diff --name-only ; git diff --name-only --staged ; } Is this the best (correct and most concise) approach? Searching for non-UTF-8 files: I've found the following code { git diff --name-only ; git diff --name-only --staged ; } | xargs -I {} bash -c "iconv -f utf-8 -t utf-16 {} &>/dev/null |

Git Stash Pop - Resolve Conflicts with mergetool

和自甴很熟 提交于 2019-12-24 09:27:14
问题 So, I've come across this suddenly, as it, in epic blundering form, rendered my application useless, but git stash pop (or apply) automatically handles the merge conflicts. When it does this, it adds both versions to the file like so: <<<<<<< Updated [remote] Change from Remote ======= Change from Stash >>>>>>> Stashed changes Not knowing this at first cost me some time, as those added lines invalidated the xml file. So, i am wondering if there is a way to enforce git stash to not auto-merge

winpty consumes git bash shell

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 01:24:47
问题 I have Windows 10. I can't enable Hyper V, so I'm using Docker Toolbox. My terminal of choice is git bash, which is a Msys2 terminal. Normally, everything works fine, except when I need an interactive terminal. For instance, docker login artifactory.mycompany.com gives: Error: Cannot perform an interactive login from a non TTY device When I try instead winpty docker login artifactory.mycompany.com nothing happens, but my console input and output is completely consumed (nothing is displayed