

If you’ve worked with Linux, you are probably familiar with the.

There are two identical versions of the post’s code, a well-commented version and a compact version. Many of the commands you use on Unix-based systems also work on Windows, within msysGit’s Git Bash. Why do you care? By installing Git for Windows, you actually get a fairly functional Unix system running on Windows. MSYS (thus the name, msysGit), is a Bourne Shell command line interpreter system, used by MinGW and originally forked from Cygwin. MinGW is a minimalist development environment for native Microsoft Windows applications. As explained on the msysGit Wiki, msysGit is the build environment for Git for Windows. Whether you download Git from the Git website or the msysGit website, you will get the msysGit version of Git for Windows. However, since I am constantly moving on and off the network with a laptop, I chose a solution to create and destroy the environment variables, as I move on and off the corporate network. In my particular development situation, I spend equal amounts of time on and off a corporate network, on a Windows-based laptop. If I were always on-site, I would modify the. gitconfig file or set equivalent environment variables that Git will look for automatically. Most solutions involve one of two approaches to handle proxy servers, authentication, and so forth. Some responses incorrectly mix configurations for Unix-based systems with those for Windows. Many responses only offer partial solutions without any explanation. Many posts are oriented toward Git on Unix-based systems. There are dozens of posts on the Internet from users trying to configure Git for Windows to work on their corporate network. Telecommuters have the added burden of constantly switching device configurations between working on-site, working off-site through a VPN, and working totally off the corporate network at home or the local coffee shop. A typical large corporate network may require Git to work behind proxy servers and firewalls, use LDAP authentication on a corporate domain, handle password expiration, deal with self-signed and internal CA certificates, and so forth. IntroductionĬonfiguring Git to work on your corporate network can be challenging. Configure Git for Windows to work when switching between working on-site, working off-site through a VPN, and working totally off the corporate network.
