The git-flow toolset is an actual command line tool that has an installation process. The installation process for git-flow is straightforward. Packages for git-flow are available on multiple operating systems. On OSX systems, you can execute brew install git-flow. Other Git for Windows downloads Git for Windows Setup. 32-bit Git for Windows Setup. 64-bit Git for Windows Setup. Git for Windows Portable ('thumbdrive edition') 32-bit Git for Windows Portable. 64-bit Git for Windows Portable. The current source code release is version 2.29.2. If you want the newer version, you can build it from the source code. Cycligent Git Flow Easily make changes to submodules/micro-repositories and multiple branches, especially restricted branches. Specify branches that are common to all submodules/micro-repositories Perform functions on a given common branch across all submodules Exclude a given micro-repository from group actions. GitFlow for Visual Studio. This Team Explorer extension integrates GitFlow into your development workflow. It lets you easily create and finish feature, release. A free Git client for Windows and Mac Sourcetree simplifies how you interact with your Git repositories so you can focus on coding. Visualize and manage your repositories through Sourcetree's simple Git GUI.
This article has been updated to reflect Git for Windows version 2.13.2 and a new version of posh-git; the PowerShell scripts have been changed to address issues raised by commenters. The previous version was posted on 12 March 2016, and any comments on this page that were written prior to 22 July 2017 are referencing that older version.
![Git Flow Tool Windows Git Flow Tool Windows](/uploads/1/3/7/5/137515321/628403788.jpg)
How to install Git on Windows 10 systems and run Git from a PowerShell command line.
Installing Git
On modern Windows systems, the best way to get Git is to use the installers produced by the Git for Windows project.
Download the install kit from https://git-for-windows.github.io/. This will download the installer for the latest release, and that will install 64-bit software. If you want 32-bit software, or a specific Git for Windows version, then visit the release section of the git-for-windows project: https://github.com/git-for-windows/git/releases.
Launch the installer as the administrator1 and walk through the installation2 dialog panels as follows:
- License. Next.
- Install path. If this isn’t installing in
Program Files
then you probably didn’t run the installer with elevated privilege1. Next. - Select options to be installed. Because the goal is to minimize the impact on the Windows system, and to run Git from a PowerShell command line, I recommend only checking the Git LFS (Large File Support).Only Git LFS. Next.
- Start menu folder name. Next.
- Adjusting the PATH. Leave the default option, the one that does not modify the path. Next.
- Choose a trusted store for TLS certificate authorities (CAs). Unless you know you need the OpenSSL CA bundle, select “Use the native Windows Secure Channel library”.Use the native Windows Secure Channel library.Next.
- Line ending conversion. Leave the default option, the one that checks out Windows-style line endings and commits Unix-style line endings. Next.
- Select the terminal emulator. On a Windows 8.1 (or Server 2012 R2) or earlier system, leave the default selection (MinTTY).On a Windows 10 system, change to use the Windows’ default console window. Next.
- Extra options. Don’t select anything. Next.
- Watch the install proceed.
- Install completed. Click Finish and read the release notes. Really. Especially the known issues section.
Adjusting the installed shortcuts
The installer will have laid down three shortcuts in the start menu.
These shortcuts are of secondary importance; the primary goal is to use Git from a PowerShell command line. However, you may find reasons to use either
Git Bash
or Git CMD
. So configure them now; launch each3 and configure the window properties4 to enable Quick Edit and set the scroll buffer to 9999 lines.- Go to the “Options” tab.
- Make sure QuickEdit Mode is checked.
- Go to the “Layout” tab.
- Change the Height property of the Screen Buffer Size to 9999.
- Click the “OK” button.
It’s worth launching a command window and checking to see that the expected version of Git is installed and running.
Configure a simple Git PowerShell command window
Use the file explorer to navigate to
:WindowsSystem32WindowsPowerShellv1.0
and right-click on powershell.exe
to create a shortcut on the desktop. Rename that shortcut to “Windows PowerShell (bootstrap)” and then move it to the Start Screen folder.5Edit shortcut properties to change the shortcut target to:
The
-NoProfile
argument is important. It prevents any default profiles from loading; and that will avoid introducing issues and injecting kruft that can send you down a troubleshooting rat hole. Yep, I speak from experience.While you are in properties dialog, you might as well set the scroll buffer to 9999 and enable QuickEdit.
Now, using your favorite programming editor, create the PowerShell profile script
%USERPROFILE%DocumentsWindowsPowerShellbootstrap-git.profile.ps1
with this content:Launch the shortcut. Enter the command
git --version
. You should see the expected Git version.Great! You’ve got Git running in PowerShell.
:-)
.Get useful CLI sugar with posh-git
posh-git is a PowerShell module that adds tab completion for Git commands and also a very helpful colorized command prompt that shows the branch and status of the current repo, including remote repo status. You will want to install posh-git.
I recommend using the manual install method so that you can keep posh-git up to date with the latest patches.
- In your new PowerShell window, check the execution policy with
Get-ExecutionPolicy
. It should beRemoteSigned
orUnrestricted
.6 cd ~Documents
and create a directoryGitHub
.cd GitHub
git clone https://github.com/dahlbyk/posh-git.git
cd posh-git
Git Flow Tool Windows 10
In the current directory you should now see a file called
example.profile.ps1
. That is an example of how to load the posh-get module and start the ssh-agent
(used to avoid repeated password prompts from SSH—more on that in the next section).I’ve taken that example and tweaked it a bit to have better colorization in the command prompt and to work from any working directory. I put it in a script file that can be included (via the source command, “
.
”) in any profile. The script is called posh-git.src.ps1
, and it looks like this:Also create a simple script that sets up the session transcript, called
transcript.src.ps1
. Something like this:![Git Git](/uploads/1/3/7/5/137515321/828411668.jpg)
Now we can create a new profile script,
posh-git.profile.ps1
and use that to launch a PowerShell window that has Git and posh-git activated. My example of that script looks like:Create another shortcut similar to the “Windows PowerShell (bootstrap)” shortcut you created before, but name it “Windows PowerShell (posh-git)” and set the Target to:
Pin that shortcut to the Start Screen and the Task Bar and you are good to go.
ssh-agent
The script above will launch an
ssh-agent
process (if one is not already running). ssh-agent
caches private key passphrases and supplies them to Git when needed. This is helpful for avoiding a passphrase prompt every time you execute a Git command that touches the remote repo. You will want to use ssh-agent
.To store your passphrase with the
ssh-agent
process, use the ssh-add
command to cache the passphrase for a private key, like so:That command will prompt you for the passphrase. If you enter the correct one, then all further use of that private key by Git will not again prompt for the passphrase.
Other tweaks
I like slightly different colors in my Git command output, so I set my Git global config7 to include these colorization overrides:
I also like to use Sublime Text 3 as my editor, so:
And I have a custom commit message template, referenced via:
It just has column numbering so I can see how long my lines are, and keep the first line under 50 characters (to make git commit history looking pretty). The template looks like this:
Upgrading Git
To upgrade Git for Windows to a new version, just run the new installer (making sure to run it as administrator). The installer will remember the configuration choices you made during the last install, so it should just be a matter of repeatedly clicking “Next”. It is probably a good idea to close any command windows that might have activated Git. And you may get prompted to kill any running
ssh-agent.exe
processes.- Right click on the file and select “Run as administrator”. Or open a command using using “Run as administrator” and run the installer EXE from that command line. ↩↩2
- I downloaded the 2.13.2 installer, Git-2.13.2-64-bit.exe, and ran it (as administrator) on my Windows 10 box. ↩
- You may need to launch the command windows using “Run as administrator” to have the privileges needed to save the window property changes. ↩
- Edit window properties by pulling down the window’s System Menu (click on the icon in the upper left of the title bar) and selecting “Properties”. You enable QuickEdit Mode from the “Options” tab. You set the scroll buffer size on the “Layout” tab by setting the Height property of the “Screen Buffer size” to 9999. ↩
- On my system, the Start Menu folder is
C:Usersheind.CORPAppDataRoamingMicrosoftWindowsStart MenuPrograms
. You can find the location of your own Start Screen by right-clicking on any Start Screen shortcut, selecting “More” and then “Open file location”. ↩ - If not
RemoteSigned
orUnrestricted
then run PowerShell as administrator and callSet-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm
. ↩ - To set the global config use a command like
git config --global color.status.add 'green bold'
. ↩
Install Git Tools Windows
When it says 'Run
command
', copy and paste the command part into a CLI, such as Powershell or the command prompt (make sure Git is in the path).- Make sure Git is installed.
- From http://gnuwin32.sourceforge.net/packages/util-linux-ng.htm, download the binaries and dependencies zip-files.
- Extract them and copy the contents of the bin-folders into your Git installation's bin folder, for example
C:Program Files (x86)Gitbin
. To find out where it is runwhere.exe git
. - Set root directory to where you want to clone git-flow.
- Run
git clone --recursive git://github.com/nvie/gitflow.git
- Run
cd gitflow/contrib
- Run
msysgit-install.cmd 'C:Program Files (x86)Git'
(remember to use the same git installation folder as above). - Test that it's working by running
git flow help
.