Issue 231 in msysgit: "Git GUI Here" and "Git Bash Here" missing in PortableGit-1.6.2.1-preview20090322.exe

163 views
Skip to first unread message

codesite...@google.com

unread,
Apr 6, 2009, 9:45:04 AM4/6/09
to msy...@googlegroups.com
Status: New
Owner: ----

New issue 231 by pipitas: "Git GUI Here" and "Git Bash Here" missing in
PortableGit-1.6.2.1-preview20090322.exe
http://code.google.com/p/msysgit/issues/detail?id=231

Being pretty new to Git (as well as development on Windows), I'm not sure
if there is a way at all to set up the 2 explorer context menu items "Git
GUI Here" and "Git Bash Here", or if the portable version had to shave
these off in order to become exactly that: portable.

However, it would be nice and usefull for newbies if you could add a small
README.portable file to that package that points out any extra steps that
need to be taken in order to take advantage of this Git version, or points
out its limited functionality (if this indeed is the case).

One thing that I found out on my own (and which also calls for a bullet
point in the README.portable):

* don't start with calling the git.exe and gitk.exe directly. You'll only
see error messages about an unset %HOME% variable...

* instead, put the directory where the git.cmd and gitk.cmd file wrapper
scripts are located (in the %portablegit_dir%\cmd\ directory) into the
%path% variable:

Example:

* open a "cmd" command window.
* execute this command: set path=c:\pa\portablegit\cmd;%path%
* start using git: git.cmd config --global user.name "Joe Sixpack"
git.cmd config --global user.email
joe.sixpack@g_mail.com

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Apr 6, 2009, 10:43:12 AM4/6/09
to msy...@googlegroups.com
Updates:
Status: WontFix

Comment #1 on issue 231 by johannes.schindelin: "Git GUI Here" and "Git

Bash Here" missing in PortableGit-1.6.2.1-preview20090322.exe
http://code.google.com/p/msysgit/issues/detail?id=231

"Portable" means that you can carry it around on your USB stick, and not
install the
thing, yet still use it.

So no, there is no way how you could tell Explorer to add those two menu
items,
_unless_ you used AutoRun, which however is completely evil and so totally
against
the spirit of "portable".

So sorry, cannot "fix".

Johan t Hart

unread,
Apr 6, 2009, 6:24:35 PM4/6/09
to msysGit
A readme sounds good though. I didnt even know where the portable
version
was good for. Could add that to the readme too :)

On 6 apr, 16:43, codesite-nore...@google.com wrote:
> Updates:
>         Status: WontFix
>
> Comment #1 on issue 231 by johannes.schindelin: "Git GUI Here" and "Git  
> Bash Here" missing in PortableGit-1.6.2.1-preview20090322.exehttp://code.google.com/p/msysgit/issues/detail?id=231

Johannes Schindelin

unread,
Apr 6, 2009, 7:11:05 PM4/6/09
to Johan t Hart, msysGit
Hi,

On Mon, 6 Apr 2009, Johan t Hart wrote:

> A readme sounds good though. I didnt even know where the portable
> version was good for. Could add that to the readme too :)

Funny, the term comes from the Windows world (who else would use the term
"portable" in another way than to mean "portable to many operating
systems"?), so I fully expected everybody to know, or at least to Google
for it.

In any case, I edited the Wiki page
http://code.google.com/p/msysgit/wiki/InstallMSysGit for your pleasure.

Oh, and you might want to avoid top-posting to prove that you read the
sticky post (as one might assume that you do not read READMEs otherwise),
Dscho

Johan 't Hart

unread,
Apr 6, 2009, 7:27:23 PM4/6/09
to msy...@googlegroups.com

> Oh, and you might want to avoid top-posting to prove that you read the
> sticky post (as one might assume that you do not read READMEs otherwise),
> Dscho
>
I'm sorry
Read it, but forgot about it. It was my first reply-post in this group
though.


codesite...@google.com

unread,
Apr 7, 2009, 8:02:39 AM4/7/09
to msy...@googlegroups.com

Comment #2 on issue 231 by kurt.pfeifle: "Git GUI Here" and "Git Bash Here"
missing in PortableGit-1.6.2.1-preview20090322.exe
http://code.google.com/p/msysgit/issues/detail?id=231

Of course you could "fix", by adding a README.portable file that points
these things
out as suggested.... :-)

codesite...@google.com

unread,
Apr 7, 2009, 8:27:02 AM4/7/09
to msy...@googlegroups.com

Comment #3 on issue 231 by johannes.schindelin: "Git GUI Here" and "Git
Bash Here" missing in PortableGit-1.6.2.1-preview20090322.exe
http://code.google.com/p/msysgit/issues/detail?id=231

Patches welcome.

codesite...@google.com

unread,
Apr 8, 2009, 3:59:54 AM4/8/09
to msy...@googlegroups.com

Comment #4 on issue 231 by kurt.pfeifle: "Git GUI Here" and "Git Bash Here"
missing in PortableGit-1.6.2.1-preview20090322.exe
http://code.google.com/p/msysgit/issues/detail?id=231

OK, I'll try. But bear in mind that I have little actual clue about the
topic I'll be
writing....

Any formal procedure to bear in mind when supplying a patch? Or is it
enough to
submit it here as a comment?

codesite...@google.com

unread,
Apr 8, 2009, 7:02:24 AM4/8/09
to msy...@googlegroups.com

Comment #5 on issue 231 by johannes.schindelin: "Git GUI Here" and "Git
Bash Here" missing in PortableGit-1.6.2.1-preview20090322.exe
http://code.google.com/p/msysgit/issues/detail?id=231

It would be smashing if you could follow
http://repo.or.cz/w/git.git?a=blob;f=Documentation/SubmittingPatches, using
Git
itself to contribute to Git...

I'd suggest adding the file to /share/WinGit/README.portable, and then
modifying
/share/WinGit/portable-release.sh to include it in the archive.

And let's move this discussion to the mailing list, okay?

codesite...@google.com

unread,
Apr 8, 2009, 7:47:12 AM4/8/09
to msy...@googlegroups.com

Comment #6 on issue 231 by kurt.pfeifle: "Git GUI Here" and "Git Bash Here"
missing in PortableGit-1.6.2.1-preview20090322.exe
http://code.google.com/p/msysgit/issues/detail?id=231

README.portable (Draft)
=======================


This "portable" version of Git for Windows (MSysGit) does not need any
specific
location. It will run from any directory you place it in. It will not write
permanent
entries into the Windows registry. It does not need administrator
privileges to
"install".


Installation
------------

This package is contained in a self-extracting 7-zip
PortableGit-<versionstring>.exe
file. After (double-)clicking the exe, you'll be asked for the desired
target
directory (which defaults to C:\Program Files\Git). You may change that as
needed or
desired. Your user account needs write access to the selected directory.
(You can
move that directory with all its contents to a different place or computer
at any
time should you later desire so).


Functional differences to "normal" MSysGit installation package
---------------------------------------------------------------

This version does not offer you the convenient right-click context menu
entries "Git
GUI Here" and "Git Bash Here", because these would require to add entries
into the
Windows registry.


Warning
-------

Since this portable package does not modify any Windows %path% variables,
it is not
possible to run the git.exe and gitk.exe files directly. Use the contained
git.cmd
and gitk.cmd wrapper batch files instead. These batch files set all the
needed paths
and environment variables before calling the respective *.exe.


How to start using PortableGit
------------------------------

We assume that you put your PortableGit package into this directory:
C:\pa\PortableGit

1. Open a "cmd" command window.
2. Execute these commands:
set gitdir=c:\portablegit
set path=%gitdir%\cmd;%path%
As long as you do not close the command window, you can now simply
type "git" or
"gitk" to really call "c:\portablegit\cmd\git.cmd"
or"c:\portablegit\cmd\gitk.cmd".
3. Start configuring git with your personal settings:
git config --global user.name "Joe Sixpack"
git config --global user.email joe.sixpack@g_mail.com
4. Start using git:
git --help

How to change %path% permanantly
--------------------------------

You may also want to make the modification to the %path% variable a
permanent one. To
do so:

* right-click "My Computer",
* select "Properties",
* open "Advanced",
* click "Environment Variables",
* highlight the "Path" variable,
* click "Edit",
* add your specific path to front of "Variable value" field, separated by a
semicolon
from the existing entry.

The Path variable may be changed:
* either on a System level (for all users in the lower pane), if you are an
Administrator
* or for your own user account only (in the upper pane).

codesite...@google.com

unread,
Apr 8, 2009, 7:50:37 AM4/8/09
to msy...@googlegroups.com

Comment #7 on issue 231 by kurt.pfeifle: "Git GUI Here" and "Git Bash Here"
missing in PortableGit-1.6.2.1-preview20090322.exe
http://code.google.com/p/msysgit/issues/detail?id=231

Sorry, I only saw your comment #5 only after I submitted the #6 one.

I'll try to do as you suggest.

Clifford Caoile

unread,
Apr 8, 2009, 10:31:11 AM4/8/09
to codesite...@google.com, Johannes Schindelin, msy...@googlegroups.com
On Wed, Apr 8, 2009 at 20:47, <codesite...@google.com> wrote:
> Comment #6 on issue 231 by kurt.pfeifle: "Git GUI Here" and "Git Bash Here"
> missing in PortableGit-1.6.2.1-preview20090322.exe
> http://code.google.com/p/msysgit/issues/detail?id=231
>
> README.portable (Draft)
> =======================

I like it.

A question: Is the main focus of the "PortableGit" distribution to
emphasize the portability of the install directory?
Or is it to bring it closer to the meaning popularized by the Portable
Apps movement? e.g. The installer not only unpacks to your directory,
but adds a space for your data alongside of the installation (in
%portableapp%\Data), and also uninstalls when unpacking on top of an
existing Portable App installation. (I am looking at your install
progress bar far too many times, Portable App Firefox).

If it is the latter case, there is some more work necessary to make it
act like a Portable App.
I don't see the need though.
I just thought to clarify the loaded word "portable" from the Windows
(perhaps Lifehacker?) crowd.

> This "portable" version of Git for Windows (MSysGit) does not need any
> specific
> location. It will run from any directory you place it in. It will not write
> permanent
> entries into the Windows registry. It does not need administrator privileges
> to
> "install".

The quotes on the "install" and "portable" are confusing and unnecessary.
I revised it to this:

PortableGit is a repackaging of Git for Windows (MSysGit) without a
Windows-style installer and without Windows Explorer context menus.
You can unpack and use Git from any directory, even your USB memory
drive. You can even it move it after unpacking. Usage does not require
writing into the Windows Registry. Installation does not require
Administrator privileges.

I agree with the focus of the rest of the README, but I feel it needs
some grammar fixes. Also, perhaps you could add a Uninstall section.
"Just delete the directory and you're done!" etc.

For your example, %gitdir% is not equal to your assumed directory?!?

Perhaps it would be better to provide a Cmd file that already does
these two steps for the user? Something like, double-click this
provided file "Portable Git Command Prompt.cmd" for steps 1 and 2.
Here it is in code:

----- cut here -----
@rem Portable Git Command Prompt.cmd
@rem Assumes that this file is in %gitdir%
@rem Do not set echo off explicitly
@rem Drag and Drop supported even for paths with spaces
@setlocal
@for /F "delims=" %%I in ("%~dp0") do @set path=%%~fIcmd;%PATH%
@if not defined HOME @set HOME=%USERPROFILE%
@title Portable Git Command Prompt
@rem Use this variable check instead of the idiom %var%==.
@rem so that can also call it from a running Command Prompt
@if a%*==a goto no_change_directory
@cd /d %*
@:no_change_directory
@cmd.exe
----- cut here -----

The above cmd file seems to work when I double click it from Windows
Explorer and also when I Drag and Drop (DnD) a folder with the name
"C:\a dir with two spaces" from Windows Explorer, so It Works For Me
(TM, Windows XP SP3). I don't remember why I set HOME to USERPROFILE.
Perhaps it's also better to set the initial working directory to
whatever HOME becomes, instead of the Portable Git installation
directory when just double clicking. Or, set HOME to %gitdir%\Data
just like a Portable Apps application so that git config --global
stuff is saved in a known Portable location, instead of USERPROFILE.

This DnD cmd file can probably be repurposed for gitk and git gui. Do
"portable" users DnD, though?

Perhaps it would be better to take a peek at the Portable Apps Command
Prompt and copy what it does. I have not looked at it though.
http://portableapps.com/apps/utilities/command_prompt_portable

>   As long as you do not close the command window, you can now simply type
> "git" or
> "gitk" to really call "c:\portablegit\cmd\git.cmd"
> or"c:\portablegit\cmd\gitk.cmd".
> 3. Start configuring git with your personal settings:
>       git config --global user.name "Joe Sixpack"
>       git config --global user.email joe.sixpack@g_mail.com
> 4. Start using git:
>       git --help
>
> How to change %path% permanantly
> --------------------------------

In light of my suggestion above, I don't think the section "How to
change %path% permanantly [sic]" is necessary.

On Wed, Apr 8, 2009 at 20:02, <codesite...@google.com> wrote:
> Comment #5 on issue 231 by johannes.schindelin: "Git GUI Here" and "Git Bash


> Here" missing in PortableGit-1.6.2.1-preview20090322.exe
> http://code.google.com/p/msysgit/issues/detail?id=231

> ...


> And let's move this discussion to the mailing list, okay?

I don't know kurt.pfeifle's address so he/she won't get this email, I
suspect. Should I add a comment on the Issue Tracker?

Best regards,
Clifford Caoile

codesite...@google.com

unread,
Apr 20, 2009, 9:30:03 AM4/20/09
to msy...@googlegroups.com

Comment #8 on issue 231 by piyokun: "Git GUI Here" and "Git Bash Here"
missing in PortableGit-1.6.2.1-preview20090322.exe
http://code.google.com/p/msysgit/issues/detail?id=231

Hi, kert.pfeifle, I replied to you on the ML, but you haven't responded?
See it here:
http://groups.google.com/group/msysgit/browse_thread/thread/3db7868fc995a80f/c8b09fbd7b
560e5d

mac

unread,
Apr 22, 2009, 3:38:21 AM4/22/09
to msysGit


On Apr 8, 4:31 pm, Clifford Caoile <p...@users.sourceforge.net> wrote:
> On Wed, Apr 8, 2009 at 20:47,  <codesite-nore...@google.com> wrote:
> > Comment #6 on issue 231 by kurt.pfeifle: "Git GUI Here" and "Git Bash Here"
> > missing in PortableGit-1.6.2.1-preview20090322.exe
> >http://code.google.com/p/msysgit/issues/detail?id=231
[...]
> I like it.

Me too ;-)

> A question: Is the main focus of the "PortableGit" distribution to
> emphasize the portability of the install directory?

My reason for using the portable version is that I don't want the
installer. I will be running it from multiple computers, including USB-
sticks. Even though I do use Portale Apps, I don't wan't git in there
since I'll be running it from inside Emacs...

[...]
> > How to start using PortableGit
> > ------------------------------
>
> > We assume that you put your PortableGit package into this directory:
> > C:\pa\PortableGit
>
> > 1. Open a "cmd" command window.
> > 2. Execute these commands:
> >       set gitdir=c:\portablegit
> >       set path=%gitdir%\cmd;%path%
[...]
>
> Perhaps it would be better to provide a Cmd file that already does
> these two steps for the user? Something like, double-click this
> provided file "Portable Git Command Prompt.cmd" for steps 1 and 2.

The cmd-file is fine, but please leave the general description as this
is what needs to be accomplished.
I want to do it inside Emacs, and I'm sure others would like to do it
in other places, including the described "How to change %path%
permanently" way.

/mac

Johannes Schindelin

unread,
Apr 22, 2009, 5:24:12 AM4/22/09
to mac, msysGit
Hi,

You will be pleasantly surprised that not only there will be a git-cmd.bat
in the next portable Git, but the description how to change %PATH% stayed.

Oh, and the next portable Git will actually work ;-)

Ciao,
Dscho

Reply all
Reply to author
Forward
0 new messages