-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work for me #2
Comments
@vinsworldcom Done a quick screencast to illustrate the issue: |
It could be a few things. First - is git.exe in your %PATH%? Open a command prompt (Start => Run => cmd.exe) and type
If it works, then maybe the space in your Git path could be an issue. Try editing the You'll want to change in the GitSCM.ini file: GitPath=C:\Progra~1\Git\cmd Cheers. |
@vinsworldcom Yes, git.exe is in the path. Git is working fine on my computer. I'm using it all the time. Tried the edit in the ini file. No effect. As you can see from my screencast, it is recognising that the file is under version control. The edited file is listed. |
OK - that screencast helps a lot. It seems you're trying to commit a file that isn't staged. Note there is not "fancy" GUI for this plugin, it's just using Git command line unless you have TortoiseGit installed in which case you get nice GUI. Try double-clicking the "M" in the list view. Or you can use the left facing green arrow to stage the file you want to commit. You should then see the "M" in list view move from the "W" column (working) to the "I" column (index). Then you can try the green checkmark to commit. Do any of the other buttons work - like status or log? Cheers. |
@vinsworldcom I had done that but not in the video. Double-clicking the M or the green arrow don't do anything, nor right click Add. Just screen flashing again. No status and log don't work either. Basically nothing does anything except for the Git Prompt button. |
The reason I ask about git in your path is because the plugin relies on CMD.exe to run Git NOT Git Bash as you may be familiar. So if you always use Git through Git Bash, it is possible that CMD.exe still does not have Git in it's path an the plugin will not work. Since it is updating the list view, I'm inclined to think Git is in your CMD.exe path; however, the button for Status and Log for example should pop open a CMD.exe prompt, execute the appropriate git command and the Pause / press any key to continue. Have you tried installing TortoiseGit - a shell overlay that uses your existing Git for Windows install? It will provide a much nicer experience if working. Cheers. |
For "status" for example, the plugin generates a command based on where your Git Path is configured (in Settings). The command for "status", in your case would be:
For me, that generates an error:
As I suspected earlier with the space in the directory name. When you tried to edit the configuration file earlier:
For me,
simply says it can't find git.exe since I don't have it installed there, but trying another program (e.g., Java) works with the "Progra~1" naming.
This is also import to have the Notepad++ Follow current Directory set as shown above since it will launch the
To find the 8.3 filename ("Progra~#") to use, open a Command Prompt: Start => Run => cmd.exe and run
Output like so:
Since you said Git was installed in "Program Files", you would use "PROGRA~1". If Git 32-bit was installed in "Program Files (x86)" and you wanted to use that, you would use "PROGRA~2". Cheers. PS: Perhaps an enhancement for a future release would be to use a single ampersand before |
Yes, git.exe is in the path. I have notepad++ default directory set to "remember last". Based on your further details on what the plugin is trying to do, I'll experiment some further tomorrow. I have tried TortoiseGit with it, but also unsuccessful. With that I got the error "no working directory found" whenever any button was pressed. So had given up on that too! |
Should add that TortoiseGit worked absolutely fine outside of the notepad++ plugin. |
You need to change Notepad++ to "Follow current directory" and try. Otherwise you won't be launching got in the correct folder. Cheers. |
I'm afraid the change to "Follow current directory" hasn't resolved either the SCM or TortoiseGit issue. I will do more investigation tomorrow. |
@vinsworldcom I have reinstalled git to c:\git to avoid any issues. Still doesn't work. If I enter the following into Run command: So that's working. If I open a file in the same repository in notepad++: I click the status button and just get a flash. Settings: |
@vinsworldcom Interestingly, If I click the Gitk button now, I get: But clearly it is a git repository as you can see from previous screenshot. So I suspect the commands are not being run in the correct directory context. Why I don't know. Directory setting as you suggested: |
btw, I am on v7.9 64bit of notepad++ |
And, if I do |
The I'm working on an update that may help troubleshoot ... Cheers. |
Yes, I understand that, I was merely replicating from the Run command what should be happening to confirm that the actual command was working (and that needed me to change to a repo directory). |
I wonder if you'd be so included as to try the latest pre-release. You do not need to set the "Git Directory" in Settings - in fact you probably shouldn't to see what it picks up and how it works without. You can manually edit the GitSCM.ini file to add the line:
That will use OutputDebugString() and you can open DebugView and filter on "git". You'll then see the command line calls the plugin is making. You'll notice there are no directories in any call and many don't have file names (like The Debug parameter must be set and unset manually in the config file as this is only for troubleshooting - it is not exposed in the UI. Cheers. |
@vinsworldcom With the pre-release, the status button now works. When I try and commit something I get this error:
Why's it trying to find GitExtensions? |
I should add that TortoiseGit integration is working fine now. |
That's good news. I don't know what GitExtensions.exe is (assuming the program I linked to?) and there is no reference to it in the plugin. Note the Git plugin actually does very little if any "git" "stuff"; rather, it shells out system calls to My guess is that you, Git for Windows, TortoiseGit, your local repo, global
Where ever that is set, it looks like the syntax is not correct. Cheers. |
As you suggest, the core.editor is set to |
Weird. I would just set the editor to something else. I used to use regular Windows I'm using
Just replace "nano" with the editor of your choice (e.g., notepad, vim) providing it is installed on your system and in your PATH environment variable. I would not use Notepad++ as you may get conflicts with trying to open another instance - I was never able to get Notepad++ to open a new tab for a commit message - that would have been nice, but not working. Cheers. |
Now that TortoiseGit integration is working I may stick with that as it's actually pretty good. |
I'll be honest, I avoided TortoiseGit and went with Git for Windows for a consistent command line experience across Windows and Linux. But once I realized TortoiseGit was not a full Git client; rather a Windows Explorer add-on and GUI experience that just fron-ends your Git for Windows install - I was "all-in". The GUI makes the Notepad++ integration so much nicer and eliminates the need for my little plugin to create all sorts of Git integration - just shell out calls to TortoiseGit. It's not perfect, sure it would be nice to do Git diffs directly in Notepad++ like the Compare plugin and do git status or logs in a Scintilla edit component or assign git blames in a Notepad++ margin, but I'm not that talented a C++ developer and this little plugin more than suits my minor Git needs. Happy it worked out for you, sorry for so much trouble. I'll be making the 1.4.4.1 pre-release the latest release in week or so if there are no other issues. Thanks for your patience. Cheers. |
Fixed in 1.4.4.1 |
@vinsworldcom I just couldn't get this to work unfortunately. None of the operations (like commit, pull etc) do anything, there's a bit of a flash on the screen and then nothing. SCM is installed and working (integrated fine with several other applications).
The text was updated successfully, but these errors were encountered: