如何在Windows中将括号配置为git

如何在Windows中将括号配置为git

本文介绍了如何在Windows中将括号配置为git core.editor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将Git配置为在我的Windows 7笔记本电脑上使用Adobe的Brackets作为核心编辑器。我正在使用Git Bash。我在学校的Mac上使用它,所以我知道这是可能的(尽管在保存Git在括号中打开的文件以供我编辑之后,我必须完全退出Brackets才能注册到Git;只需关闭文件即可)工作)。
这是我在Mac上配置的工作:

这是我试过的在Windows上:

与open -n -nW -wl1 -a作为选项



如果我没有打开Brackets,那么这个工作正常 - 打开Brackets并打开文件供我编辑(尽管如此,我必须完全退出Brackets,才能以已保存的方式注册到Git)。



但是,如果我已经打开了Brackets,到括号 - 它不打开文件,它的内容。无论我打开一个工作文件还是根本没有工作文件,所有Git都会激活Brackets,但不打开文件。



如果任何人有任何问题想法如何解决这个问题,请让我知道..如果我能让Git通过在保存后关闭编辑后的文件来确认我的保存,而不必退出整个程序,但更重要的是我只需要它在Windows支架上正确打开文件。感谢!

解决方案

这适用于我在GitBash上:

<$ p $ $ echo'别名括号=c:/ Program \ Files \ \(x86 \)/Brackets/Brackets.exe

(您需要反斜杠\来转义空格和括号。)



GitBash不显示确认或错误信息给我。关闭GitBash。打开GitBash。输入以下内容:

  $括号

,它应该打开支架。



我在Udacity上找到了关于如何设置GitBash来打开Sublime编辑器的解决方案。


I'm trying to configure Git to use Adobe's Brackets as the core editor on my Windows 7 laptop. I'm using Git Bash. I have it working on a Mac at school, so I know it's possible (although after saving a file that Git opens in brackets for me to edit, I have to completely exit Brackets for it to register to Git; simply closing the file doesn't work).This is what I have configured on the Mac that works:

This is what I've tried so far on Windows:

with combinations of "open -n -nW -wl1 -a" as options

If I don't have Brackets already open, then this works fine- it opens Brackets and opens the file for me to edit (although again, I have to completely exit Brackets for it to register to Git as saved).

However, if I already have Brackets open, all it does it tab over to Brackets- it doesn't open up the file and it's contents at all. It doesn't matter if I have a working file open or none at all- all Git does is activate Brackets but doesn't open the file.

If anyone has any ideas how to fix this, please let me know.. it would also be nice if I could get Git to acknowledge my save by closing the edited file after saving instead of having to exit the entire program, but more than anything I just need it to open the files correctly on Windows Brackets. Thanks!

解决方案

This works for me on GitBash:

$ echo 'alias brackets="c:/Program\ Files\ \(x86\)/Brackets/Brackets.exe"

(You need backslash \ to escape spaces and parenthesis.)

GitBash displays no confirmation or error message for me. Close GitBash. Open GitBash. Type the following:

$ brackets

and it should open Brackets.

I found the solution on Udacity on how to set up GitBash to open the Sublime editor. https://www.udacity.com/wiki/ud775/sublime

这篇关于如何在Windows中将括号配置为git core.editor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 08:50