标签: git-bash

从git bash中的">"提示中恢复

如何退出>登录git bash?我的意思是我在git bash中复制粘贴一些输出并满足该行为.我需要在没有关闭git终端的情况下退出.

bash git-bash

3
推荐指数
1
解决办法
125
查看次数

如何将控制台代码更改为1252?

我试图使用Git Bash提供的命令行在Windows 8上使用PostgreSQL,这样我就可以像命令一样运行Unix.使用以下命令访问Postgres时:psql -U postgres我得到:

警告:控制台代码页(850)与Windows代码页(1252)等不同...

在Windows命令工具中,我只需要chcp 1252在访问Postgres之前键入,这样就不会显示警告.unix/git bash中的等效命令是什么?

我尝试做chcp 1252或chcp从Git bash但它输出:

sh.exe":chcp:命令未找到

有任何想法吗?

windows postgresql git-bash

3
推荐指数
1
解决办法
3106
查看次数

使用GIT Bash,ERROR:找不到存储库 - 致命:无法从远程读取

我朋友在Git存储库中的项目,下载了'Git-1.9.4-preview20140929.exe'并安装了GIT bash将项目拉到我的最后,我用它做了

$ git clone <with SSH clone URL>
Run Code Online (Sandbox Code Playgroud)

我在我的本地系统中得到了这个项目,现在我做了一些改动,我想把更改推回到存储库,所以我做了

$ git init
Reinitialized existing Git repository in c:/users....
Run Code Online (Sandbox Code Playgroud)

和

$ git add .
$ pom.xml
./pom.xml: line 1: project: No such file or directory
./pom.xml: line 2: syntax error near unexpected token `newline'
./pom.xml: line 2: `  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http
://maven.apache.org/maven-v4_0_0.xsd">'
Run Code Online (Sandbox Code Playgroud)

和

 $ git commit -m 'First commit'
 On branch master
 Your branch is ahead of 'origin/master' by 2 commits.
   (use "git push" to publish your local commits)

 nothing to …
Run Code Online (Sandbox Code Playgroud)

git github git-bash

3
推荐指数
1
解决办法
9393
查看次数

更改Git Bash上的默认位置

我是使用Git Bash和Git Hub的新手.安装Bash后,我接受了所有默认设置.这样做,使我的网络驱动器成为默认目录.我将脱机使用,需要将默认目录更改为本地驱动器.我试图将GitBash的位置路径更改为本地驱动器,但这样做不起作用.我怎么能改变这个?此外,是否需要对GitHub帐户进行任何更改?

git github repository git-bash

3
推荐指数
2
解决办法
8108
查看次数

Git Bash 2.5无法连接到mysql

我有一个非常恼人的问题,通过Git Bash 2.5连接到MySQL(通过localhost上的Windows).通过CMD和Mysysgit一切正常.

$ mysql -u root -proot Warning: Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.6.26-log MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for …

mysql windows git git-bash

3
推荐指数
1
解决办法
1996
查看次数

git bash:写完提交消息后卡住了

我正在尝试使用git bash将文件添加到我的github帐户.我有"提交",我已输入所需的消息.但是现在,我被困了(MINGW64).如果我尝试:q,:退出,:退出!,没有任何反应.如果我尝试CTRL + C,我可以输入:退出!但在这种情况下,我的提交被中止.

你有什么主意吗?

git git-commit git-bash mingw-w64

3
推荐指数
2
解决办法
4566
查看次数

Git克隆一个分支,而不是主人

我使用Git Bash作为bitbucket.我已经创建了一堆,我推了一些提交,其他人推动了master中的提交作为例外.现在我在不同的机器上.我想克隆或下载我的分支的最新提交的解决方案,而不是主人?我怎样才能做到这一点?

git branch bitbucket git-clone git-bash

3
推荐指数
3
解决办法
2万
查看次数

git中的(master*)是什么意思?

我只是一个初学者学习git.在我对文件进行更改后的git bash中,(master)更改为(master*)或(master +).为什么以及何时发生?

git git-bash

3
推荐指数
1
解决办法
1371
查看次数

Git Bash插入Tilde

有谁知道什么可能导致git bash在终端窗口中随机插入波形符.

另外我不确定是否相关,但是当在vim中查看日志文件时,帮助对话框会自动在vim的拆分窗口中打开.

有谁知道这个问题是什么?我怀疑它可能是某种保持活力的设置,但我还没有想出这个.

vim git-bash

3
推荐指数
1
解决办法
833
查看次数

Python os.system:命令顺序

为什么a.py用内容调用文件

import os
print('Hi')
os.system('cat a.py')
Run Code Online (Sandbox Code Playgroud)

产生以下输出,如何让它们以正确的顺序打印?

$ python a.py
import os
print('Hi')
os.system('cat a.py')
Hi
Run Code Online (Sandbox Code Playgroud)

你看到cat命令打印到stdout之前print.在Windows 10上的GitBash中运行Python 3.6时会发生.在Ubuntu 17.10上,Python 3.6 不会发生这种情况.


注意:我知道我可以file.readlines()轻松地打印文件内容.这只是一个简单的例子.但是,当运行更复杂的东西时,理解为什么会发生这种情况以及如何解决这个问题变得很重要

python python-3.x git-bash python-os

3
推荐指数
1
解决办法
1905
查看次数