Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs:git:git_on_windows [2010/10/11 12:58] – billh | docs:git:git_on_windows [2012/09/14 12:47] (current) – [git gui and gitk on cygwin] billh | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== git on Windows ===== | ===== git on Windows ===== | ||
- | As of this writing, the official git distribution for Windows is the cygwin version. | + | As of this writing, the official git distribution for Windows is the cygwin version. |
+ | |||
+ | ===== git gui and gitk on cygwin ===== | ||
+ | Ever since day one with git, I've been using the two most powerful front-ends (git gui and gitk) along with the command line. No matter how fast anyone thinks they are with the command line, these two tools do several things faster and more efficiently, | ||
+ | |||
+ | Anyway, I've come up with a solution that works well and does NOT use an X server. | ||
+ | |||
+ | So, just set up cygwin and git as normal, then set up msysgit. | ||
+ | # an update early in 2012 to cygwin' | ||
+ | # tcl/tk to be ran on an X windows server, so these gui aliases are now | ||
+ | # kickstarting TortoiseGit and msysgit programs instead | ||
+ | # Cygwin git | ||
+ | #alias gg=' | ||
+ | #alias gk=' | ||
+ | |||
+ | # Cygwin git / msysgit hybrid (checks if x server is available) | ||
+ | alias gg="([ \" | ||
+ | alias gk="([ \" | ||
+ | alias gka=" | ||
+ | |||
+ | # | ||
+ | alias tgg="/ | ||
+ | alias tgk="/ | ||
+ | |||
+ | #msysgit | ||
+ | alias mgg="/ | ||
+ | alias mgk="/ | ||
+ | </ | ||
+ | |||
+ | I'm also eager to see what the msysgit folks decide to do with tk; hopefully they leave it alone :) | ||
+ | |||
+ | ==== More Information ==== | ||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | ===== TortoiseGit ===== | ||
+ | [[http:// | ||
+ | |||
+ | I've had the best luck with TortoiseGIT by setting the following: | ||
+ | * Icon Overlays should run in Shell Extended or Shell status cache mode | ||
+ | * make sure AutoCrlf and SafeCrlf are unchecked in Git-> | ||
+ | * use WinMerge as an external diff viewer (although I like Tortoise as a conflict resolver) | ||
+ | * add a few commonly used items to your Context Menu for quick access | ||
===== gitshare ===== | ===== gitshare ===== | ||
Line 10: | Line 52: | ||
open a dos shell by running as administrator (only administrator can run mklink command) | open a dos shell by running as administrator (only administrator can run mklink command) | ||
c: | c: | ||
- | cd | + | cd \ |
mklink /D gitshare x: | mklink /D gitshare x: | ||
</ | </ | ||
Line 22: | Line 64: | ||
If you do try to use cygwin git and msysgit together, you may notice the msysgit will identify all files as changed when a project is cloned via cygwin git. This is because cygwin git sets core.filemode = true for each cloned repository. | If you do try to use cygwin git and msysgit together, you may notice the msysgit will identify all files as changed when a project is cloned via cygwin git. This is because cygwin git sets core.filemode = true for each cloned repository. | ||
- | To fix this, you can either remember to set filemode = false in each repo's .git/config file, or use msysgit to clone the project. | + | To fix this, you can either remember to set filemode = false in each repo's .git/config file, or use msysgit to clone the project. |
+ | vi `find . -maxdepth 3 -name config` | ||
+ | </ | ||
+ | |||
+ | An easy way to check the status of your configs is to use my [[gitr]] script and pipe it with grep like this:< | ||
+ | gitr showconfig|grep -E ' | ||
+ | </ | ||
==== External Links ==== | ==== External Links ==== | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
* [[http:// | * [[http:// |