How do I write a batch file which opens the GitBash shell and runs a command in the shell?
“C:\Program Files (x86)\Git\bin\sh.exe” –login -i -c “git archive master | tar -x -C $0” “%~1”
“C:\Program Files (x86)\Git\bin\sh.exe” –login -i -c “git archive master | tar -x -C $0” “%~1”
Git bash is already a batch file with content similar to this : C:\WINNT\system32\cmd.exe /c “”C:\Git\bin\sh.exe” –login -i” If you want run (and leave running) a shell script in the context of the shell, specify it at the command line. The trick is that when the script file name is interpreted, it uses the Windows … Read more
What is probably missing is the user environment variable HOME. If you launch your DOS session from the git-cmd.bat script packaged with msysgit, it should be defined, and you should see %HOME%\.ssh\id_rsa(.pub) But from any other DOS windows, HOME isn’t defined by default (HOMEPATH or USERPROFILE are). See also “Fix msysGit Portable $HOME location” as … Read more
builtin/merge.c: const char *argv_gc_auto[] = { “gc”, “–auto”, NULL }; builtin/receive-pack.c: “gc”, “–auto”, “–quiet”, NULL, git-am.sh: git gc –auto git-rebase–interactive.sh: git gc –auto && git-svn.perl: command_noisy(‘gc’, ‘–auto’); From git grep — –auto on git.git, those results looked interesting. The notable one is builtin/merge.c meaning that the ever so common git pull should trigger a git … Read more
This doesn’t exist, but it could easily exist in the current framework. Just as Git acts differently with displaying binary or ASCII files when performing a diff, it could be told to offer special treatment to certain file types through the configuration interface. If you don’t want to change the code base (although this is … Read more
Are they not the same thing? On: http://msysgit.github.com/ The title is Git for Windows, the application is msysgit. Even in the event they are not, I expect the only differences will be in the method of compilation (i.e. compiler used and any options set) and any extraneous packaging (such as having a bash emulating shell … Read more
I don’t understand, why you don’t want to set the $HOME environment variable since that solves exactly what you’re asking for. cd ~ doesn’t mean change to the root directory, but change to the user’s home directory, which is set by the $HOME environment variable. Quick’n’dirty solution Edit C:\Program Files (x86)\Git\etc\profile and set $HOME variable … Read more
stupid fix (this changed /SSH/home/rvc/.gitconfig): rvc@RVC-DESKTOP /c/code/myapp (master) $ git config –global remote.origin.receivepack “git receive-pack” rvc@RVC-DESKTOP /c/code/myapp (master) $ git push Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 246 bytes, done. Total 2 (delta 0), reused 0 (delta 0) To ssh://[email protected]:5858/SSH/home/rvc/myapp.git 680f32e..2da0df1 … Read more
As illustrated in the doc ssh troubleshooting, this is probably caused by an incorrect path during cloning. The documentation (some parts below were only valid for Gitolite V2) mentions: The second error (ie. “you are able to clone repositories but are unable to push changes back (the error complains about the GL_RC environment variable not … Read more
Update 2010-2014: Both ssh and https are equivalent, since Git 1.6.6+ (2010) and the implementation of smart http protocol: You now can use ssh or https for read/write access to your repos. You can also detect if your remote server supports smart http. Add the right environment variable if you have to use a proxy. … Read more