I recently started using the Windows version of git (msysgit) and I am delighted with how easy it was to install and how stable it seems to be. I know git-bash is not a 100% correct linux implementation and as a long time DOS/Windows guy there are lot of linux/unix things that I am trying to figure out. Still, it would be great if someone with enough experience in this area would find a way to integrate drush into the msysgit git-bash environment so people could run both git and drush from the same console window.
I will continue to putter with it but I am guessing all the way ... if I figure it out I will post my solution here for review but in the meantime maybe someone who does not need to guess can beat me to the punch. I promise not to be offended. :)
Comments
Comment #1
CJack commentedBTW: I an aware this slightly overlaps issues like #766080: Windows support for drush: escaping the path to drush in backend invoke and elsewhere but since git will become more and more relevant in Drupal as time goes forward it makes sense to have an integrated git/drush environment for windows.
Who knows? this could possibly lead to a solution for the 766080 issue as well. :)
Comment #2
greg.1.anderson commentedWould you happen to know if it is possible to run git on Windows under Powershell? We definitely want to support using git on Windows, but it is unclear at this time how many different shells we should support.
I have not really used drush on Windows, but will begin doing so in a few weeks.
Comment #3
greg.1.anderson commentedThe git bash issue is a duplicate of #1103038: DIRECTORY_SEPARATOR causes errors on Windows running CygWin/Msys/Git shell. It is easy to run git on Windows under Powershell if you follow github's configuration instructions for Windows. Drush for Powershell is in-progress now.
Comment #4
greg.1.anderson commentedComment #5
IvoryTierra commentedI am not 100% sure this will help but with the help of densolis I was able to use drush commands in git.
Step I:
Copy this path [C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\ProgramData\Drush\;C:\Program Files (x86)\Drush\GnuWin32\bin;C:\Program Files (x86)\Drush\Php] into your clipboard
Step II:
Click on Start>(right click)Computer>Properties>Advanced system settings>Environment Variables...>
At the top window titled "User variables for [username], click New...
Enter [Path] in the top text field. Paste the C:\ path in the second text field. Then click "OK"
Step III:
Open a fresh git-bash window. Enter "echo $PATH" in the command line. It should produce a long path "/c/Users/[username]/bin:.:/usr/local/bin:/mingw/bin:/bin:/c/Program Files......some long string....."
Now enter a drush command [drush status]
Well if you get something like this
"PHP configuration : C:\Program Files (x86)\Drush\Php\php.ini"
"Drush version : 5.7"
"Drush configuration :"
then your good. If it doesn't work. Try to close the window and retry.
If this doesn't work, you may need to redownload drush from the drush.org resources page. Make sure the option for "register environmental variables" is enabled.
Comment #6
decypher commented