1

I've faced weird problem in my NetBeans 8.1.

After cloning Git repository in default directory (My documents/NetBeansProject/ProjectDir) I'm able to access the Git context menu (for example, Git -> Commit).

However, if I change this directory into another (let it be C:/Projects/ProjectDir), the context menu option Git disappears from right-click menu on project.

Why does it work like this?

I've found similiar case: NetBeans not showing GIT in the right-click menu where (in comments) @VonC suggests passing the git-dir argument. How can I do that?


EDIT: As suggested in comments, I've used the external git command. git status in both C:/Projects/ and My documents shows as follows:

On branch master
Your branch is up-to-date with 'origin/master'.

git remote -v also does have the same output in both directories.

Community
  • 1
  • 1
deem
  • 1,252
  • 1
  • 19
  • 38
  • Is there a `.git` subfolder in `C:/Projects/ProjectDir`? If not, you would need to clone your repo to `C:/Projects/ProjectDir`. – VonC Mar 08 '16 at 12:52
  • There is this directory. As I have mentioned in my question - I have alreade cloned project from Git. Everything seems the same in those two directories - the only one difference is that I cant access `Git` option in context menu - and thanks to that, I can't even commit to Git anymore... – deem Mar 08 '16 at 13:19
  • Right now I have cloned the same projects in those two different locations. Effect: I have `Git` option on project from `My documents` and the other one does not have it. I've inspected directories physically on disk and the `.git` directory seems fine in both cases. – deem Mar 08 '16 at 13:25
  • So when you go to `C:/Projects/ProjectDir` in command-line, does a `git status` works? Does a `git remote -v` returns the same output in that folder as it would in `My documents/NetBeansProject/ProjectDir`? – VonC Mar 08 '16 at 15:25
  • Answers to your question are in my post. I suppose now it's NB bug? – deem Mar 09 '16 at 07:19
  • It looks that way, indeed. – VonC Mar 09 '16 at 07:21
  • Maybe there is some workaround for this problem. You did mention about the `git-dir` option - maybe this could help? – deem Mar 09 '16 at 07:25
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/105768/discussion-between-deem-and-vonc). – deem Mar 09 '16 at 07:28
  • Not sure it could help here, unless you modify the code of the NB git plugin. Maybe try and launch NB after setting the environment variable GIT_DIR first? Sorry, no chat at work (blocked) – VonC Mar 09 '16 at 07:31

0 Answers0