2013-02-01 135 views
1

我一直在这一整夜,但似乎无法得到任何工作。设置Git本地使用Intellij Idea 12

这就是我想做的事:

我在的IntelliJ IDEA 12的一个项目,我想用Git的使用。我想在本地使用git以供我个人使用。

我已经安装了git并将其设置为IntelliJ中的VCS。但是,我实际上无法推送任何内容,因为Intellij说没有远程设置。在git bash中,我在其他地方建立了一个'remote'文件夹,并将其命名为'Project.git'文件夹。

然后我浏览回到我的IntelliJ项目和所使用的命令:

git remote add origin C:\Users\Me\RemoteFolder.git 

没有错误。

然后我推,并得到以下错误:

fatal: 'C:UsersMeRemoteFolder.git' does not appear to be a git repository 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

有人能告诉我什么是错的?或者只是给我一个简单的指南,用于在Intellij本地设置Git?我已经尝试过他们的文档和大约100次谷歌搜索,似乎无法找到我的问题的答案。

任何帮助表示赞赏。

回答

2

首先,您需要创建一个bare repogit init --bare C:\Users\Me\RemoteFolder.git)以便推送到它。

其次,您需要声明远程考虑到反斜杠(\)不被很好支持的事实。 This should work better

git remote add /C/Users/Me/RemoteFolder.git 
# or even 
git remote add C:/Users/Me/RemoteFolder.git