There is no way to select a default behavior. "trouble": if I have resolved conflicts in the merge I am about to "Can cause troubles"? Huh? If I did not know Show this dialog box "rebasing a merge commit might easily causeīut there are a number of problems with this dialog:ġ. There are merge commits to be rebased, it will ask you about whether Merge, it will merge, if you say it to rebase, it will rebase. Steiny reports in the comments having to do: git config -global core.editor '"C:/Program Files (x86)/Git/scripts/npp.I really like how SmartGit is smart when doing pulls. You would not have then to specify any path for the script. Or (my favorite) place ' npp.sh' in a directory part of your %PATH% environment variable. Or try the shortname notation (not fool-proofed): git config -global core.editor C:/progra~1/git/npp.sh ' c:\program files\.',), you have three options:Įither try to quote the path (single or double quotes), as in: git config -global core.editor 'C:/program files/git/npp.sh' If you want to place the script ' npp.sh' in a path with spaces (as in "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -nosession \ "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -nosession -noPlugin "$(cygpath -w "$*")" It makes no good to disable the tab during rebase, but makes a lot of harm to general Notepad usability since -notab becomes the default setting and you must Settings>Preferences>General>TabBar> Hide>uncheck every time you start notepad after rebase. Val commented (and then deleted) that you should not use -notabbar option: With "$(cygpath -w "$*")" being the important part here. nosession -noPlugin "$(cygpath -w "$*")" "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar \ Multiple lines for readability: #!/bin/sh "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar -nosession -noPlugin "$(cygpath -w "$*")" So the script in that case would be: #!/bin/sh Git is passing it a cygwin path and npp doesn't know what to do with it Note also that, if you are using Git on Cygwin (and want to use Notepad++ from Cygwin), then scphantm explains in " using Notepad++ for Git inside Cygwin" that you must be aware that: Note the ' -multiInst' option, for ensuring a new instance of notepad++ for each call from Git. More details on the SO question How can I set up an editor to work with Git on Windows? sh file with Unix style line endings or receive mysterious error messages!") (As Franky comments: "Remember to save your. Those commands are interpreted as shell script, hence the idea to wrap any windows set of commands in a sh script. "c:/Program Files/Notepad++/notepad++.exe" -multiInst "$*"ĭoes work. The following: C:\prog\git>git config -global core.editor C:/prog/git/npp.sh Zumalifeguard's solution (upvoted) is simpler than the original one, as it no longer needs a shell wrapper script.Īs I explain in " How can I set up an editor to work with Git on Windows?", I prefer a wrapper, as it is easier to try and switch editors, or change the path of one editor, without having to register said change with a git config again.Īdditional information: the following solution works with Cygwin, while the zuamlifeguard's solution does not.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |