2

Looking for some opinions/experience from people who develop on Windows and store their source at GitHub.

I'm evaluating git for a big corporation (600+ developers), because subversion doesn't scale all that well with remote working and contentious check-ins etc. I like the idea of git, but it seems really weak in it's usability.

I, like most other developers, develop on on Windows and deploy to Linux. Consequently I want source control environment that works easy on Windows (via a command shell). I'm aware that Subversion is ahead of the game for Windows command line access, but surly there must be 1000s of Devs out there using windows.

Can anyone point me to a great tutorial/beginners guide for using git from a windows machine.

Here are some of the frustrating problems I've encountered:

Whenever you try and check in you have to keep entering:

git config --global user.name "USER_NAME"
git config --global user.email "EMAIL"

The github help just says you have to do the above each time you open a command shell.

When trying to use the git@github.com:... version of checking in I get message:

Permission denied (publickey)

And then looking around the internet all responses and help are in linux land again.

Any guides or help that doesn't involve using linux emulators would be really appreciated.

Thanks Adam

Adam Davies
  • 2,742
  • 4
  • 33
  • 52

3 Answers3

1

You need to store your SSH public key in GitHub.

To generate one on your machine, just run your Git Bash, then call ssh-keygen and hit enter a bunch of times! That will generate a file called id_rsa.pub in your current user's directory in the subdirectory .ssh. Copy everything in that file and paste it into the box on GitHub that allows you to add SSH keys.

On Github:

  1. Login to your account
  2. Click Account Settings in the top right
  3. Click SSH Keys on the left side
  4. Click Add SSH Key
  5. Paste the contents of your id_rsa.pub file

You'll now have permission to push/pull from your GitHub repository on this machine.

aardvarkk
  • 14,955
  • 7
  • 67
  • 96
  • Thanks for the quick response. Got that bit working. Any idea what `Your branch is ahead of 'origin/master' by 1 commit.` means and how to get over it? – Adam Davies Nov 28 '12 at 16:30
  • @AdamDavies would that be similar to what you can find in http://stackoverflow.com/search?q=%5Bgithub%5D+%22Your+branch+is+ahead%22 , like http://stackoverflow.com/questions/12548442/github-branch-is-ahead-message-not-clear ? Or http://stackoverflow.com/q/9100161/6309 ? – VonC Nov 28 '12 at 16:37
1

If you are evaluating git you should separate out the two different and distinct concerns that are

  1. changing to a DVCS (i.e. git) and

  2. the minor hassles of working on Windows.

Using a DVCS is a whole new way of working, whether you use an in-house central server(s), or use GitHub (or other provider). There is the separation of projects into separate repos (e.g. see gitolite http://sitaramc.github.com/gitolite/; Using (lots of) feature branches; Committing locally (very) often, without review; Choosing a workflow, with variants, according to project size & complexity; etc. All of your centralised control processes will probably be 'wrong', or at least inappropriate, certainly for 600+ developers!

Windows has a few awkward moments given that git is Linux, but they will be minor compared to the DVCS journey. The Git-Gui is solid, and Git Extensions provide a windows style gui comfort blanket.

Do a few pilot projects.

Find developers who want to use git and who have the nouse [nous] to understand it and stick with it. Build outward carefully and steadily.

Philip Oakley
  • 13,333
  • 9
  • 48
  • 71
0

Common considerations

I'm afraid with this style of preparation to migration and problem-solving you and "big corporation" are on the road to Hell:

  • "Big Corporation" and GitHub repos - CSO will be "happy"

Any GUI for Git is only frontend, which hide (some of) complexity of core under the hood. If you don't know base, you can only poorly use GUI as "monkey with grenade"

Different Windows Git-GUIs may have different paradigms and use different metaphors, thus - company have to select client and have training courses for employees for this client

Git GUI-clients for Windows are presented in a rather wide range

  • TortoiseGit
  • Git Extension
  • SmartGit
  • Perforce Git Fusion (may be excellent choice in corporate Git-market)
Brian Webster
  • 30,033
  • 48
  • 152
  • 225
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110