![]() MIT |
![]() CBA |
FabCentral | FabClass [fall 2007] | People | Steve | git from cygwin |
![]() |
Use the standard cygwin setup tool to add git to your system (it exists under the "devel" packages).
Substitute the correct number for <PORT>and the correct path for <REPOSITORY_DIR> below
mkdir ~/.ssh
Create file named ~/.ssh/config, and make it contain:
Hostname fab.cba.mit.edu
Port <PORT>
chmod 700 ~/.ssh/config
git clone fabclass@fab.cba.mit.edu :<REPOSITORY_DIR>
git commit -m "some message"In my case, I had made changes in Dreamweaver, which saved files with windows-style CRLFs instead of civilized newlines. This caused
git committo refuse to do the commit, and it printed out a whole bunch of output, prefaced by the statement: "You have some suspicious patch lines".
To fix it, I had to modify the perl script
<GIT_DIR>/.git/hooks/pre-commit(where <GIT_DIR> is the top level of the copy of the repository on my local machine) , and comment out the following lines:
if (/\s$/) {
bad_line("trailing whitespace", $_);
}like so:
# if (/\s$/) {
# bad_line("trailing whitespace", $_);
# }This fix was copied from information on: http://www.dont-panic.cc/capi/tag/git/
After doing this, my
git commitcommand worked, and I was able to dogit push.