Just wondering if anyone is working on a portable MSysGit. They do have a "portable version" on their website (http://code.google.com/p/msysgit/) but I've found it needs a little work to make it use a home directory on your USB flash drive instead of your Windows home directory.
If anyone is interested in this and nobody is working on it, I do have a working (bash shell only for now) MSysGit Portable that I've been playing with, based on the portable MSys/MinGW already available in the forums here. I'm thinking of cleaning it up a bit, trying to get the command prompt working (like I said it's bash shell only for now.. not a problem for those of us who like working with Linux.. lol) and post it here.
Post your shell script and I should be able to turn it into a PortableApps.com Launcher configuration file for you. Is it mainly just setting HOME?
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
I actually have the launcher built, modified the MinGW Portable launcher. There was only one change to the shell script to set the HOME directory and I had to add an etc/fstab file to map the portable home directory to /home
I think I'll package it up and post it here (I'm guessing it should go in the Beta Testing forum?). The bash shell works and it keeps its own portable home directory for things like ssh keys (required for pushing to github). I'll be looking into getting the Git command prompt working for those who are more comfortable in a Windows command prompt than a bash shell, I'm sure it's probably as simple as setting an environment variable in the launcher.
edit: It really was that simple. Posted my first attempt at a portable MSysGit in the beta forum if anyone wants to take a look at it.
I also used the portable distribution of MsGit, before i came around this post. My intentions though was to portalize GitExtensions (http://code.google.com/p/gitextensions) too. The reason - i think - is clear: I want to have something more than the shell to manage my git repositories. Up to a point it was a success, so i would like to share my experience with you and maybe get some help on this...
In order to "portalize" the installation, I used the Portable App Creator. One interesting note is that GitExtensions installer does not allow u to install it on a portable drive. In my case, I always test drive my portable installs on a non-persistent VM, having two disks attached: one for the operating system (c drive, 30GB), and one to use as a portable app usb test-drive (Z Drive, 8GB). Having the disks non-persistent, allows me to have a clean test environment every time i reboot my VM. In this case, as Z Drive is a physical drive, GitExtensions can be installed on it. Part of the installation of GitExtensions is installing msgit and KDiff3. I skip these - i already have created a KDiff3 merge and diff tool portable app using PAC - and only install the GitExtensions on my portable drive.
After the installations is complete, I run the application - as part of the Portable App Creator process - and set the basic configuration. I point to the git.cmd on my portable drive, and setup up my diff /merge settings to point to my portable KDiff3 installation. When i am done, I have a working portable GitExtensions application icon on my menu.
As part of my testing process, I reboot my VM to test drive my app in a clean environment. Everything works fine. The extensions git settings are properly configured, and all i have to do is setup my email, load my keys and i am ready to go. I successfully clone repositories, do changes, commit, push and pull. Everything works and i am excited. The problem is that when i close the application and run it again, all my settings are gone... After a lot of looking around in files I found the cause of the problem but not the solution ...
The GitExtentions store the settings in the registry. So, In the DefaultData folder, I have working registry settings. After i run and close the application, I see that the registry setting in my Data folder are changed, and settings are no longer recognized by the GitExtenstions next time i run it. If I replace contents of the Data folder with those inside the DefaultData one, and rerun the application, everything works. After some digging, I found out that the registry entries in the DefaultData registry settings point to no physical drive (they point to PA:\ ..), while the registry settings in my Data folder point to Z:\... respectively...
Basically, that is my only problem. Unfortunately, I am more a "tool" guy than a "script" one, so I could use some help or guidance on how to overcome this problem - and if i am able to overcome it at all.
Also, there is one last thing i would like to point out: GitExtensions provide
A UI for managing repositories rather than using shell commands directly, (b) shell extensions for windows explorer and (c) integration with vs 2005/2008/2010. I am basically focusing on (a). I would love to be able to use (b) and i don't care about (c) - as the latest is not that portable anyway.
That's all. Any help is much appreciated.
Hope I'm being usefull.
What's the status on this?
MSysGit Portable 1.6.5 Development Test 1
...and I recon stevenh512 could do with some feedback![Smile](https://portableapps.com/sites/all/modules/smiley/packs/kolobok/smile.gif)
Formerly Gringoloco
Windows XP Pro sp3 x32
Your application launcher is definitely a lot cleaner than the crappy launchers that msysgit supplies. To make life a lot easier I'd like to install some right-click context handlers, I've already got the registry modification code written and working for msysgit, how hard would it be to incorporate that into the portable apps version?
The code is in 2 files: one to install the context handlers; one to remove them.
install-contextmenu.bat:
@rem grab the current directory and excape the slashes
@set CD=%CD:\=\\%
@rem Add Git Bash to the context menu
@echo Windows Registry Editor Version 5.00 >tmp.reg
@echo [HKEY_CURRENT_USER\Software\Classes\Directory\shell\Git Bash] >>tmp.reg
@echo @="Open in Git &Bash" >>tmp.reg
@echo "Extended"="" >>tmp.reg
@echo [HKEY_CURRENT_USER\Software\Classes\Directory\shell\Git Bash\command] >>tmp.reg
@echo @="wscript \"%CD%\\Git Bash.vbs\" \"%%1\"" >>tmp.reg
@echo [HKEY_CURRENT_USER\Software\Classes\Directory\shell\Git GUI\] >>tmp.reg
@echo @="Open in Git &GUI" >>tmp.reg
@echo "Extended"="" >>tmp.reg
@echo [HKEY_CURRENT_USER\Software\Classes\Directory\shell\Git GUI\command] >>tmp.reg
@echo @="\"%CD%\\bin\\wish.exe\" \"%CD%\\libexec\\git-core\\git-gui\" --working-dir \"%%1\"" >>tmp.reg
@start /wait tmp.reg
@erase tmp.reg
This looks complex on the surface but it's a clever workaround to launch a dynamic registry update. The first part gets the current directory and escapes all of the backslashes. The body builds a valid registry file in tmp.reg with the correct commands. The last part launches the .reg file and cleans up after itself.
Note: You won't see the menu items in Windows 7 (and Vista?) because I set the Extended flag. It just means you need to hit shift-right-click to display the menu items (the same functionality as is used to show a command prompt in win7).
uninstall-contextmenu.reg:
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Classes\Directory\shell\Git Bash]
[-HKEY_CURRENT_USER\Software\Classes\Directory\shell\Git GUI\]
Simple stuff here. This just wipes out the keys that were previously created.