标签: msysgit

如何在我的git(windows上的msysgit)后提交脚本以python而不是bash的形式调用我的python脚本?

我在python中写了一个post commit脚本,"c:\ myfolder\myscript.py".我想从post-commit脚本调用它.这找不到:

#!/bin/sh
c:\myfolder\myscript.py
Run Code Online (Sandbox Code Playgroud)

bash认为命令c:myfoldermyscript.py - 斜线被丢弃.

所以,我尝试了正斜杠:

#!/bin/sh
c:/myfolder/myscript.py
Run Code Online (Sandbox Code Playgroud)

但是,似乎bash认为我的.py文件本身就是一个bash脚本,所以我得到了bash错误,因为它错误地试图解释它.

git bash msysgit

4
推荐指数
2
解决办法
3013
查看次数

如何在msysgit vim中启用语法突出显示和语法缩进?

我使用mysgit for windows,但mysgit vi编辑器无法为我的源代码(html/python/css ....文件)进行语法高亮和缩进

我设法将语法文件夹从我原来的GVIM7.2安装复制到Git Vim72安装文件夹,现在我看到语法高亮显示是活动的.

什么是无法做到的是缩进.我试图将我的GVim7.2安装中的ftplugin文件夹复制到Git Vim72文件夹,但仍然没有缩进.

我试图在vimrc文件设置文件类型插件缩进,但仍然没有任何工作?

有关如何启用语法缩进的任何帮助?

迦特

git vim msysgit

4
推荐指数
1
解决办法
4032
查看次数

在Msysgit中取消设置core.editor

我为每个SO条目设置编辑器:如何使用msysgit / gitk设置DiffMerge?

我想知道如何撤消此操作,因为我想切换回默认编辑程序。

text-editor msysgit

4
推荐指数
1
解决办法
458
查看次数

git --git-dir无法在windows中运行

在Git的钩子脚本中,我试图运行这样的命令..

请参考(git --git-dir未按预期工作)

git log --name-status --git-dir="C:\Documents and Settings\user\My Documents\Visual Studio 2008\Projects\CMS\.git" --work-tree="C:\Documents and Settings\user\My Documents\Visual Studio 2008\Projects\CMS"
Run Code Online (Sandbox Code Playgroud)

当我运行此命令时,我收到以下错误.

fatal: Not a git repository (or any of the parent directories): .git
Run Code Online (Sandbox Code Playgroud)

我使用的命令有什么问题吗?

git msysgit

4
推荐指数
2
解决办法
2671
查看次数

如何清除GIT存储库

在Tortoise SVN中有一个Repo-Browser,我们可以简单地删除所有文件并再次添加新文件.

我们怎样才能在GIT中做到这一点?

repo不在GITHub中托管,并且repo url没有任何接口

为什么?

我创建了一个本地仓库并推入远程主机,但之后意识到它位于错误的目录中,所以,本地很容易,只是

git init 
git add .
git commit -m "New place commit;"

git remote add alias https://user@domain.com/reponame.git
git push alias master
Run Code Online (Sandbox Code Playgroud)

但我得到了错误

To https://user@domain.com/reponame.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'user@domain.com/reponame.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.
Run Code Online (Sandbox Code Playgroud)

女巫很好,因为我正在推动一个新的回购...所以我只是想清除远程的那个以便能够推动这个新的...

git msysgit

4
推荐指数
1
解决办法
5847
查看次数

哪个msysgit版本下载?

我放弃了cygwin的Git版本,现在我想安装msysgit.

问题是......它们都是预览版本.

我需要Git进行制作.那里有stable发布吗?

更复杂的是,我一直在使用gg版本1.7.5.1在cygwin上工作(签入和签出)...这会改变答案吗?

git msysgit

4
推荐指数
1
解决办法
2194
查看次数

设置git和ssh并使用ssh-agent在Windows上使用msysgit存储密码

好吧,这是一个非常具体的问题,但我遇到了一些挑战,所以我想我会分享我的经验,所以如果其他人遇到同样的问题,他们可以更快地解决它.

目标:尽可能安全地使用ssh-agent和msysgit存储ssh密钥密码,以防止必须为涉及远程存储库的每个git命令键入它

git ssh msysgit

4
推荐指数
1
解决办法
3156
查看次数

在Windows下克隆git repo时我得到"错误:无法创建文件<file> ...(是一个目录)"

Z:\>git clone git://github.com/kennethreitz/httpbin.git
Cloning into 'httpbin'...
remote: Counting objects: 1073, done.
remote: Compressing objects: 100% (401/401), done.
remote: Total 1073 (delta 672), reused 1045 (delta 651)
Receiving objects: 100% (1073/1073), 114.42 KiB | 128 KiB/s, done.
Resolving deltas: 100% (672/672), done.
error: unable to create file httpbin/templates/... (Is a directory)
Run Code Online (Sandbox Code Playgroud)

git版本1.8.0.msysgit.0,Windows Vista SP2 x64

怎么了?

windows git msysgit

4
推荐指数
1
解决办法
5258
查看次数

如何在git bash中设置正确的本地时区?

我在Windows系统上使用git-bash.

Windows时钟显示当地时间,但在git-bash中,一切都在GMT时间:

$ date
Mon Mar 31 16:08:57 GMT 2014
Run Code Online (Sandbox Code Playgroud)

设置TZ也不会改变:

$ TZ="Europe/Berlin" date
Mon Mar 31 16:09:01 GMT 2014
Run Code Online (Sandbox Code Playgroud)

同样,它始终git log只是GMT.

有没有办法在git-bash中设置正确的时区?

windows git timezone msysgit git-bash

4
推荐指数
1
解决办法
2209
查看次数

由于"SSL协议"错误,Windows上的Git无法使用远程工具

TL;博士

由于神秘的"SSL协议"错误,Windows上的Git停止连接到github.HALP!

问题

我正在Windows上开发,使用私有GitHub仓库进行源代码控制.当我第一次启动我的系统,我能够访问远程回购没有问题- ,,pull 等所有的工作就好了.pushfetch

经过一段时间(*),这会停止,我收到以下错误:

致命:无法访问' https://github.com/our-team/private-repo.git/ ':与github.com:443相关的未知SSL协议错误

(*)时间似乎是变化的 - 我目睹了一到两个小时,直到一整天.通常在从系统休眠回来后,这似乎是一个问题,但我不知道它是由时间延迟还是由系统睡眠引起的.

通过cURL检查,我明白了

? curl -v "https://github.com/our-team/private-repo.git/"
*   Trying 192.30.252.130...
* Connected to github.com (192.30.252.130) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:\Program Files (x86)\Git\bin\curl-ca-bundle.crt
  CApath: none
* TLSv1.0, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to github.com:443
* Closing connection 0
curl: (35) Unknown SSL protocol error in connection to github.com:443
Run Code Online (Sandbox Code Playgroud)

使用set GIT_CURL_VERBOSE=1with git …

windows git curl github msysgit

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

msysgit ×10

git ×9

windows ×3

bash ×1

curl ×1

git-bash ×1

github ×1

ssh ×1

text-editor ×1

timezone ×1

vim ×1