I started working on my feature and started adding commits. We were 4 developers working on the project and I forked the project from upstream/master at point M2. This was my scenario on a project where I was working: M1 - M2 - M3 - M4 I got a doubt regarding why the git rebase command replays the commits of feature branch one by one instead of just replaying the latest commit on the feature branch. Steiny reports in the comments having to do: git config -global core.editor '"C:/Program Files (x86)/Git/scripts/npp.I am new to git commands and recently came over the git rebase command. 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 |