msysGit - Portable Git for Windows (preview)
msysGit - Portable Git for Windows (preview)
A portable version of Git for Windows (MSysGit). MysGit is an almost feature-complete fork of Git on Windows, offering a Unix-type shell and a Perl interpreter using a very minimal version of MSys. Historically, Git on Windows was only officially supported using Cygwin. To help make a native Windows version, this project was started, based on the MinGW fork.
Code license:GNU GPL v2
MSysGit Home on GitHub:
http://github.com/msysgit/msysgit/wiki
http://msysgit.github.io/
MSysGit howto:
http://githowto.com/
Portable version download (PortableGit-1.8.4-preview20130916.7z):
http://code.google.com/p/msysgit/
If file extension is renamed to .exe, file becomes a self-extracting archive. Otherwise, use 7zip to extract to the desired location.I
I did not test this for portability. It's still a preview version. Might be of interest to developers on this board.
Code license:GNU GPL v2
MSysGit Home on GitHub:
http://github.com/msysgit/msysgit/wiki
http://msysgit.github.io/
MSysGit howto:
http://githowto.com/
Portable version download (PortableGit-1.8.4-preview20130916.7z):
http://code.google.com/p/msysgit/
If file extension is renamed to .exe, file becomes a self-extracting archive. Otherwise, use 7zip to extract to the desired location.I
I did not test this for portability. It's still a preview version. Might be of interest to developers on this board.
-
- Posts: 39
- Joined: Fri Apr 12, 2013 3:20 am
Re: msysGit - Portable Git for Windows (preview)
msysgit portable works nicely. Here are some things you have to do to set up.
1. Set the home folder to a relative location by editing etc/profile. Find the following lines in the file etc/profile:
Change them to:
2. Then you can correctly create /home/.gitconfig and /home/.ssh folder ssh key files to authenticate with Git as per these instructions:
http://markashleybell.com/portable-git- ... iable.html
https://help.github.com/articles/generating-ssh-keys
3. To get a colored and helpful prompt and colored directory listings, create a file /home/.bashrc containing:
4. Turn off automatic Windows-Unix line-ending conversion (best to manage this yourself with a good text editor). In Git Bash prompt type:
1. Set the home folder to a relative location by editing etc/profile. Find the following lines in the file etc/profile:
Code: Select all
# normalize HOME to unix path
HOME="$(cd "$HOME" ; pwd)"
Code: Select all
# normalize HOME to unix path
HOME="/home" #portablefreeware set home to relative location
HOME="$(cd "$HOME" ; pwd)"
http://markashleybell.com/portable-git- ... iable.html
https://help.github.com/articles/generating-ssh-keys
3. To get a colored and helpful prompt and colored directory listings, create a file /home/.bashrc containing:
Code: Select all
shopt -s promptvars
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1='\[\033[1;36m\]\[\033[0m\]\[\033[1;34m\]\w\[\033[0m\] \[\033[1;32m\]$(__git_ps1)\[\033[0m\]\$ '
# enable color support of ls
alias ls='ls --color=auto -alhX'
Code: Select all
git config --global core.autocrlf true
Last edited by robertcollier4 on Mon Oct 21, 2013 11:16 pm, edited 3 times in total.
Re: msysGit - Portable Git for Windows (preview)
Places .bashrc in the user's home directory (Documents and Settings/user for XP) by default. The following guide shows how change that by using a home/user folder within the installation as well as a couple of more tweaks for maximum portability. It's working using the new home location. I haven't gone through the entire guide yet to set up profile.
http://markashleybell.com/portable-git- ... iable.html
http://markashleybell.com/portable-git- ... iable.html
-
- Posts: 1234
- Joined: Wed Jul 18, 2007 5:45 pm
Re: msysGit - Portable Git for Windows (preview)
I've been using msysGit Portable for awhile now.
Definitely follow Mark's advice in his article. I'm also hacking msysGit to use SVN and other bash-related stuff.
Definitely follow Mark's advice in his article. I'm also hacking msysGit to use SVN and other bash-related stuff.
is it stealth?
Re: msysGit - Portable Git for Windows (preview)
Credit to robertcollier4 for pointing out the home folder change, the links to the setup guides, as well as his other tips in the 2nd post.
For those using XP, you may need to install clip.exe to copy public key to the clipboard, depending on your version (I'm using Home). See article below:
http://github.com/railsinstaller/railsi ... /issues/26
This worked for me:
http://www.c3scripts.com/tutorials/msdos/clip.html
If following Mark's guide, http://markashleybell.com/portable-git- ... iable.html, the ssh agent script should be placed in a file named ".profile" instead of "profile" in your home directory; otherwise, the file won't load. Although it starts the ssh agent, I get a grep error. Anyone else getting this?
Also, to have msysGit use your home directory on startup, you can create a shortcut from git-bash.bat and enter the path to your home directory in the "Start in:" section of properties. Additionally, you can setup Console2 with git-bash.bat and define the start up directory there.
I changed my prompt settings to the following in .bashrc (updated, the other prompt was causing issues):
PS1='\n\e[1;36m$(pwd)\e[m\n\e[1;33m[\h]:[\u]\e[m\n->'
Successful at merging, pulling, pushing, etc between local and remote repo using the msysGit GUI with ssh after making the changes indicated above.
For those using XP, you may need to install clip.exe to copy public key to the clipboard, depending on your version (I'm using Home). See article below:
http://github.com/railsinstaller/railsi ... /issues/26
This worked for me:
http://www.c3scripts.com/tutorials/msdos/clip.html
If following Mark's guide, http://markashleybell.com/portable-git- ... iable.html, the ssh agent script should be placed in a file named ".profile" instead of "profile" in your home directory; otherwise, the file won't load. Although it starts the ssh agent, I get a grep error. Anyone else getting this?
Also, to have msysGit use your home directory on startup, you can create a shortcut from git-bash.bat and enter the path to your home directory in the "Start in:" section of properties. Additionally, you can setup Console2 with git-bash.bat and define the start up directory there.
I changed my prompt settings to the following in .bashrc (updated, the other prompt was causing issues):
PS1='\n\e[1;36m$(pwd)\e[m\n\e[1;33m[\h]:[\u]\e[m\n->'
Successful at merging, pulling, pushing, etc between local and remote repo using the msysGit GUI with ssh after making the changes indicated above.
Last edited by TP109 on Thu Nov 07, 2013 12:46 pm, edited 1 time in total.
-
- Posts: 1234
- Joined: Wed Jul 18, 2007 5:45 pm
Re: msysGit - Portable Git for Windows (preview)
I use mintty instead of Console2. Also try ConEmu.TP109 wrote:Additionally, you can setup Console2
is it stealth?
-
- Posts: 39
- Joined: Fri Apr 12, 2013 3:20 am
Re: msysGit - Portable Git for Windows (preview)
To start it with ConEmu, you can use following command-line or shortcut:freakazoid wrote:I use mintty instead of Console2. Also try ConEmu.TP109 wrote:Additionally, you can setup Console2
Code: Select all
D:\PortableApps\ConEmu\ConEmu.exe /cmd D:\PortableApps\msysgit\bin\bash.exe --login -i -cur_console:n
Last edited by robertcollier4 on Mon Oct 21, 2013 1:10 pm, edited 1 time in total.
-
- Posts: 39
- Joined: Fri Apr 12, 2013 3:20 am
Re: msysGit - Portable Git for Windows (preview)
I ended up removing all of the code to auto-start the ssh agent and it seems to still work fine without ever asking me for my password. I think the new version of msysgit loads the ssh agent internally by itself without needing to have it run in a separate process. My /home/.profile only contains and it works fine:TP109 wrote:If following Mark's guide, http://markashleybell.com/portable-git- ... iable.html, the ssh agent script should be placed in a file named ".profile" instead of "profile" in your home directory; otherwise, the file won't load. Although it starts the ssh agent, I get a grep error. Anyone else getting this?
Code: Select all
SSH_ENV="$HOME/.ssh/environment"
The profile file in etc folder is without a period, the .profile file in home folder is with a period - that is, /etc/profile and /home/.profileTP109 wrote:the ssh agent script should be placed in a file named ".profile" instead of "profile" in your home directory;
Also here is a way to get msysgit to use WinMerge (portable) to do directory diff:
http://stackoverflow.com/a/17074271
Re: msysGit - Portable Git for Windows (preview)
I also use mintty. Trying ConEmu with the start up command provided by robertcollier4. ConEmu has tons of configurable options. Works nicely. Any reason this app not included in the PFC database?freakazoid wrote:I use mintty instead of Console2. Also try ConEmu.TP109 wrote:Additionally, you can setup Console2
That worked if not using a pass phrase. After changing the keys to include a pass phrase, it was necessary to start ssh-agent using the script or else entering the pass phrase for every server connection. Didn't try erasing everything out of .profile except for the code above using pass phrase protected keys yet. As it is configured now, I just have to enter the pass phrase once when starting the shell. See http://www.halyph.com/2012/08/how-to-us ... ysgit.htmlrobertcollier4 wrote:I ended up removing all of the code to auto-start the ssh agent and it seems to still work fine without ever asking me for my password. I think the new version of msysgit loads the ssh agent internally by itself without needing to have it run in a separate process. My /home/.profile only contains and it works fine:Code: Select all
SSH_ENV="$HOME/.ssh/environment"
I noticed that too.robertcollier4 wrote:The profile file in etc folder is without a period, the .profile file in home folder is with a period - that is, /etc/profile and /home/.profile
Configuring msysGit to use winmerge portable now according to your consolidated SO post. Yep, that thread was getting messy alright. Gave it an up vote.robertcollier4 wrote:The Also here is a way to get msysgit to use WinMerge (portable) to do directory diff:
http://stackoverflow.com/a/17074271
Re: msysGit - Portable Git for Windows (preview)
msysGit renamed Git For Windows; version is currently v2.6.4 (site moved; changelog is now at http://github.com/git-for-windows/git/releases/).
Re: msysGit - Portable Git for Windows (preview)
Git for Windows 2.7.0 is available: https://github.com/git-for-windows/git/ ... .windows.1
My YouTube channel | Release date of my 13th playlist: August 24, 2020
Re: msysGit - Portable Git for Windows (preview)
Git for Windows 2.8.1 up.
My YouTube channel | Release date of my 13th playlist: August 24, 2020
Re: msysGit - Portable Git for Windows (preview)
Git for Windows 2.10.0 up.
My YouTube channel | Release date of my 13th playlist: August 24, 2020
Re: msysGit - Portable Git for Windows (preview)
Git for Windows 2.11.0 up.
My YouTube channel | Release date of my 13th playlist: August 24, 2020
Re: msysGit - Portable Git for Windows (preview)
Small note regarding the Git sites: the official Git site hosts the Git for Windows download as the default for Windows.
Also: GitPortable (PortableApps format)
Also: GitPortable (PortableApps format)