How to set up a GIT server on windows

You will need:

  • CopSSH 3.1.4 (the latest free version)
  • Git for Windows 1.7.10 (or later)

On the server:

  1. Install Git for Windows, selecting the “Run Git and included Unix tools from the Windows Command Prompt” when prompted. This option will install a bin folder inProgram Files\git that will be placed into your path thus taking possibly taking precedence over other tools.
  2. Open up a bash prompt and run the following commands (these hard links are necessary, because CopSSH 3.0.3 appears to have an issue with symbolic links):
    cd /bin
    ln -f ../libexec/git-core/git-upload-pack.exe git-upload-pack.exe
    ln -f git.exe git-receive-pack.exe
  3. Install CopSSH
  4. Right-click “Computer” in the start menu and select “Manage”. Select “Local Users and Groups” and proceed to create Windows users for all Git users. It is not required, but I recommend you give them passwords.
  5. Activate all the Windows users under the CopSSH “01. Activate a User” option. Untick the “Create link to user’s real home directory” option when doing so. Create new public and private keys if you don’t have keys already.
  6. If you already have private and public keys, copy them to the …Program Files\ICW\home\{username} folder and call them {username}.key and {username} Also copy the public key to …ICW\home\{username}\.ssh\ and rename it to “authorized_keys”.
  7. Create your Git repositories (git init –bare …) and make sure that you grant appropriate access rights to the repository folders for all users created in step 4. (If a user does not have write access to the repository folder then an attempt to push to the repository will fail.)
  8. If you need remote access to the server, forward the SSH protocol (port 22, UDP and TCP) from your router to the server.
  9. Reboot the server so the changes to the Path environment variable can take effect.

On the workstation:

  1. Copy the private key generated in step 5 (or the one you used in step 6) to the .ssh subfolder in your user profile (typically c:\Users\Administrator\.ssh) and rename it to “id_rsa”.
  2. If you’ve generated the private key with a passphrase and you wish to remove it, run “ssh-keygen -p” in a command prompt and specify a blank new passphrase. If you don’t remove the passphrase you will be prompted for the password every time you interact with the server.
  3. If you’re using TortoiseGit, remember to specify in the installer that you’re using OpenSSH.
  4. To check out a repository: git clone {username}@{servername}:{repodriveletter}:/{repopath}

See Also

Once you have your sever setup and the users enabled through CopSSH, check out theofficial git docs for a more detailed explanation of actually setting up your repos on the server and then doing your initial commits from your workstation.

some good software on OS X

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart’s content to match your own needs.

Install Software

The software selected is software that is “tried and true” — software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store

Install from Third-Party Websites


Mensch coding font

#Xcode Command Line Tools

Xcode > Preferences > Downloads > Command Line Tools


Run Xcode and accept the license

Homebrew can not install properly until this occurs.

Install Homebrew

ruby -e "$(curl -fsSL"
brew doctor

At the time of this writing, brew doctor says that Xcode 6.1 is required, which means downloading it from the Apple Developer Center until it is released in the Mac App Store.

Install Homebrew extension Cask

Nothing to do anymore. Homebrew handles this by default.

Install common applications via Homebrew

Databases are installed later.

brew install ack autojump automake colordiff curl git git-flow \
             hub icoutils imagemagick libmemcached memcached openssl ossp-uuid qt \
             readline redis tmux wget libxml2

Install applications via Homebrew Cask

brew cask install anvil
brew cask install atom
brew cask install authy-bluetooth
brew cask install awareness
brew cask install bartender
brew cask install battery-guardian
brew cask install github
brew cask install google-chrome
brew cask install joinme
brew cask install iterm2
brew cask install parallels
brew cask install rescuetime
brew cask install rubymine
brew cask install satellite-eyes
brew cask install sidestep
brew cask install sonos
brew cask install spotify
brew cask install steam
brew cask install vagrant
brew cask install vagrant-manager

Install Parallels plugin for Vagrant

vagrant plugin install vagrant-parallels

See for more details.


Install custom .dotfiles

git clone ~/.dotfiles

Update .bash_profile

echo 'source ~/.dotfiles/' >> ~/.bash_profile

OS X Preferences

#Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0.02

#Set a shorter Delay until key repeat
defaults write NSGlobalDomain InitialKeyRepeat -int 12

#Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

#Show the ~/Library folder
chflags nohidden ~/Library

#Store screenshots in subfolder on desktop
mkdir ~/Desktop/Screenshots
defaults write location ~/Desktop/Screenshots

Set hostname

sudo scutil --set HostName SpaceX-Falcon-9


Setup Github

ssh-keygen -t rsa -C ""

# Copy ssh key to
subl ~/.ssh/

# Test connection
ssh -T

# Set git config values
git config --global "Kevin Elliott"
git config --global ""
git config --global github.user kevinelliott
git config --global github.token your_token_here

git config --global core.editor "subl -w"
git config --global color.ui true

Sublime Text

Add Sublime Text CLI

mkdir -p ~/bin && ln -s "/Applications/Sublime" ~/bin/subl

Install Package Control

Run Sublime Text 3 and access the console via the CTRL + ``` shortcut or the View > Show Console` menu.

import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( '' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

See for more information. Their site has a note that this install code will change for each new release, so it would be good to check once in a while.

Install Packages


Install Soda Theme

git clone git:// ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Theme\ -\ Soda

Install Tomorrow Theme

git clone git:// ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Color\ Scheme\ -\ Tomorrow


Sublime Text > Preferences > Settings – User

    "close_windows_when_empty": true,
    "color_scheme": "Packages/Color Scheme - Tomorrow/Tomorrow-Night-Eighties.tmTheme",
    "draw_indent_guides": false,
    "font_face": "Mensch",
    "font_size": 18,
    "highlight_modified_tabs": true,
    "show_tab_close_buttons": false,
    "tab_size": 2,
    "spell_check": false,
    "theme": "Soda Light.sublime-theme",
    "word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"

Key Bindings

	{ "keys": ["super+b"], "command": "expand_selection", "args": {"to": "brackets"} },
	{ "keys": ["super+f"], "command": "show_panel", "args": {"panel": "replace"} },
	{ "keys": ["super+alt+f"], "command": "show_panel", "args": {"panel": "find"} }


git clone "/Users/Joel/Library/Application Support/Sublime Text 2/Packages/Byte"



brew install docker boot2docker
boot2docker init
boot2docker up


brew install mysql
brew pin mysql

MySQL Settings

# Copy launch agent into place
mkdir -p ~/Library/LaunchAgents && cp /usr/local/Cellar/mysql/VERSION/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/

# Edit launch agent and set both keepalive and launch at startup to false
vi ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

# Inject launch agent
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

# Set up databases to run as your user account
unset TMPDIR && mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

# Start mysql
start mysql

# Secure mysql


brew install postgres --no-ossp-uuid
brew pin postgres

PostgreSQL Settings

# Initialize db if none exists already
initdb /usr/local/var/postgres

# Create launchctl script
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/VERSION/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/

# Edit launchctl script (set to not start automatically and keepalive false)
subl ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

# Inject launchctl script
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

# Start PostgreSQL
start pg

Ruby Gems

libv8 / therubyracer

brew uninstall v8
gem uninstall libv8
brew install v8
gem install therubyracer
gem install libv8 -v -- --with-system-v8


brew tap homebrew/dupes
brew install libxml2 libxslt libiconv
gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/VERSION/


brew install -v --HEAD --without-ssse3
gem install capybara-webkit -v '0.9.0'

aww yeah

view raw
hosted with ❤ by GitHub

elimite ^M in gvim


This happens when you have a mixture of Windows line endings and Unix ones. If you have 100 lines, 99 are \r\n and one is \n, you’ll see 99 ^M characters. The fix is to find that one line and replace it. Or run dos2unix on the file. You can replace the Windows line endings with: