Challenge with Git-Bash
Hello,
with my Windows 7 Git-Installation I get following challenge:
1) Set GIT_EDITOR to editor of your choice
2) With Windows7 let this editor run in admin-mode
Goto .exe-file -> right mouse-click -> compatibility -> run program
as admin (I'm running a German version maybe English names are slightly different)
3) Make a git action like git add file
git commit
from the git bash.
4) Now following message appears: sh.exe: ./"editor of your choice":
Bad file number
Everything is fine without Admin-Mode set for editor. In other words if you get rid of step 2) step 4) doesn't appear instead the editor starts. Due to other tasks my editor of choice has to run in this mode - stupid enough.
Any chance to get around this problem?
(No not taking a different editor, no not getting rid of admin mode :) )
Reggies,
Rainer Lauer
(+cc: msysgit)
Hi Rainer,
Quoted 9 lines · Rainer Lauer
with my Windows 7 Git-Installation I get following challenge:
1) Set
GIT_EDITORto editor of your choice2) With Windows7 let this editor run in admin-mode
Goto .exe-file -> right mouse-click -> compatibility -> run program as admin (I'm running a German version maybe English names are slightly different)
Quoted 8 lines
3) Make a git action like git add file
git commit
from the git bash.4) Now following message appears: sh.exe: ./"editor of your choice":
Bad file numberEverything is fine without Admin-Mode set for editor.
Apparently “Bad file number” can mean “Permission denied” among other things on Windows. I do not have any better suggestion than to try running git bash as administrator too, sorry.
Regards,
Jonathan
Hi Jonathan,
thanks for this hint. Now it is working on the base of environment variables.
In order of automatically setting up my projects I'd like to use the configuration file for preparing CVS-work instead introducing environment variables. Unfortunately, I'm facing another problem.
Following commands don't modify .git/config coming along with my project(s).
git config user.name="Rainer Lauer"
git config user.email="[email protected]"
git config core.editor="c:/Program Files/SlickEditV14.0.2/win/vs.exe"
The file seems to stay in initial revision as created with the command git init.
Where is following information stored? Command: git config --global user.name="Rainer Lauer". Did I get the documentation right that this is a definition for all projects?
Regards,
Rainer
-----Ursprüngliche Nachricht-----
Von: Jonathan Nieder [mailto:[email protected]]
Gesendet: Samstag, 17. Juli 2010 19:13
An: Rainer Lauer
Cc: [email protected]; [email protected]
Betreff: Re: Challenge with Git-Bash
(+cc: msysgit)
Hi Rainer,
Quoted 9 lines · Rainer Lauer
with my Windows 7 Git-Installation I get following challenge:
1) Set
GIT_EDITORto editor of your choice2) With Windows7 let this editor run in admin-mode
Goto .exe-file -> right mouse-click -> compatibility -> run program as admin (I'm running a German version maybe English names are slightly different)
Quoted 8 lines
3) Make a git action like git add file
git commit
from the git bash.4) Now following message appears: sh.exe: ./"editor of your choice":
Bad file numberEverything is fine without Admin-Mode set for editor.
Apparently “Bad file number” can mean “Permission denied” among other things on Windows. I do not have any better suggestion than to try running git bash as administrator too, sorry.
Regards,
Jonathan
Files used by git config (Re: Challenge with Git-Bash)
Hi again,
Quoted 2 lines · Rainer Lauer
Where is following information stored?
Command: git config --global user.name="Rainer Lauer".
I recommend looking that the user manual[1] to start out. It has a few relevant hints.
From the preface:
Comprehensive reference documentation is available through the man pages, or git-help(1) command. For example, for the command "git clone <repo>", you can either use:
$ man git-clone
or:
$ git help clone
From the start to “chapter 3: developing with git”:
Before creating any commits, you should introduce yourself to git. The easiest way to do so is to make sure the following lines appear in a file named .gitconfig in your home directory:
[user]
name = Your Name Comes Here email = [email protected]
(See the "CONFIGURATION FILE" section of git-config(1) for details on the configuration file.)
Regards,
Jonathan
[1] http://kernel.org/pub/software/scm/git/docs/user-manual.html
Quoted 11 lines · Rainer Lauer
Hi Jonathan,
thanks for this hint. Now it is working on the base of environment variables.In order of automatically setting up my projects I'd like to use the configuration file for preparing CVS-work instead introducing environment variables. Unfortunately, I'm facing another problem.
Following commands don't modify .git/config coming along with my project(s).
git config user.name="Rainer Lauer"
git config user.email="[email protected]"
git config core.editor="c:/Program Files/SlickEditV14.0.2/win/vs.exe"
The file seems to stay in initial revision as created with the command git init.
Quoted 1 line
Where is following information stored? Command: git config --global user.name="Rainer Lauer". Did I get the documentation right that this is a definition for all projects?
If you're asking why your .git/config file isn't being carried over when you clone the repository that's because it's not supposed to, Git doesn't work like that.
Quoted 1 line · Rainer Lauer <lauerr <at> gmx.net> writes:
Where is following information stored? Command: git config --global
user.name="Rainer Lauer".
The '=' appears in your config file (.git/config), but shouldn't be used on the comand line.
Quoted 17 lines · Rainer Lauer
Hello,
with my Windows 7 Git-Installation I get following challenge:
1) SetGIT_EDITORto editor of your choice
2) With Windows7 let this editor run in admin-mode
Goto .exe-file -> right mouse-click -> compatibility -> run program as admin (I'm running a German version maybe English names are slightly different)
3) Make a git action like git add file
git commit
from the git bash.
4) Now following message appears: sh.exe: ./"editor of your choice":
Bad file number
Everything is fine without Admin-Mode set for editor. In other words if you get rid of step 2) step 4) doesn't appear instead the editor starts. Due to other tasks my editor of choice has to run in this mode - stupid enough.
Quoted 2 lines
Any chance to get around this problem?
(No not taking a different editor, no not getting rid of admin mode :) )
Did you actually set "GIT_EDITOR" to the string "editor of your choice", as opposed to the full path to Emacs, notepad or something like that?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Rainer Lauer
Hi,
thanks for the reply. I did set the full path to my editor of choice.
Good that it worked out. CC-ing the list so that others encountering this problem will find the solution.
Hi,
from Jonathan Nieder <[email protected]> I got a successfully work-around. See attached mail. Thanks for your support and amazingly fast response.
Regis,
Rainer Lauer
-----Ursprüngliche Nachricht-----
Von: Ævar Arnfjörð Bjarmason [mailto:[email protected]]
Gesendet: Sonntag, 18. Juli 2010 16:56
An: Rainer Lauer
Cc: Git Mailing List
Betreff: Re: Challenge with Git-Bash
Quoted 2 lines · Rainer Lauer
Hi,
thanks for the reply. I did set the full path to my editor of choice.
Good that it worked out. CC-ing the list so that others encountering this problem will find the solution.
(+cc: msysgit)
Hi Rainer,
Quoted 9 lines · Rainer Lauer
with my Windows 7 Git-Installation I get following challenge:
1) Set
GIT_EDITORto editor of your choice2) With Windows7 let this editor run in admin-mode
Goto .exe-file -> right mouse-click -> compatibility -> run program as admin (I'm running a German version maybe English names are slightly different)
Quoted 8 lines
3) Make a git action like git add file
git commit
from the git bash.4) Now following message appears: sh.exe: ./"editor of your choice":
Bad file numberEverything is fine without Admin-Mode set for editor.
Apparently “Bad file number” can mean “Permission denied” among other things on Windows. I do not have any better suggestion than to try running git bash as administrator too, sorry.
Regards,
Jonathan