Git and github on windows

December 20, 2009 · Posted in Git , Programming

The git is an open source tool for version control of files. Its distributed architecture allows you to be more productive because it does not require a central server to receive commits.

The CVS was the first version control system with which I worked. I do not know if it was by my inexperience, but he was always a thorn in more than a tool.

When I met Subversion was amazed:

"Wow! You can take a snapshot of the entire repository. Wow! "

The annoying part was that even as CVS, needed a server where to send my commits. So when I was without a server connection or not, was simply not possible to commit changes, unless of course I keep a copy on your machine and reositório gerenciasse this mess.

When I heard about git, I was not very enthusiastic, but after the first use:

"Caceta, I do not need a server to send commits!"

I will not get the features of git here, because this is not the goal of the post. For those who want to study the git's extensive documentation on the internet and in the git site and there is a nice book available under Creative Commons called Pro Git .

A few months ago I also met github , a website source-forge-like where you can host your versioned with git projects, interact with other developers and more.

For those living in the unix world, working with github is trivial. It's just register a user, generate an SSH key and start posting code.

Now if you share the sad fate of the few lucky ones who have not freed themselves from the windows, use the github ... is trivial too!

For this purpose it is necessary to install Cygwin. Cygwin is a very cool tool that automates the installation of applications typically unix on windows.

The installation process is very simple. Download the Cygwin directly from your site and run with a double click (duh!!).

Instalação do Cygwin - Tela inicial

There are several customization options. I used the default settings until you reach the screen where it configures the repository where the installer will download the packages. Here a caveat: some stores are quicker than others. Make your tests. I used http://cygwin.cibermirror.org.

Instalação do Cygwin - Mirrors

After the package selection screen, go Devel tab and select the packages from git.

Instalação do Cygwin - Git

NET tab, select the packages openssh.

Instalação do Cygwin - Open SSH

Next, next, finish.

Instalação do Cygwin - Finish Him!

From here, assuming you already a registered user on github, lack configure the access keys. The keys are security mechanisms used by the server to make sure it is you yourself. If you are not yet a registered user on github, sign up for free .

To create the key just follow the steps in the tutorial which has its own github and generate the key. Go to Account Settings and then SSH Public Keys. There is a small link Need help with public keys'. The tutorial is somewhat outdated in relation to the screen it shows, but is still fully functional.

In short, open the Cygwin terminal that you just installed, type ssh-keygen-t rsa-C "seu_email@vai_aqui.com", as shown in the figure, replacing seu_email@vai_aqui.com for your email of course, answer the questions and enter a password. This password can be a long sentence (recommended) or may be empty. She will be requested every time you synchronize data with github.

You must now send to github public key. To do this open the public key - usually .ssh / id_rsa.pub - with notepad, copy and paste the text in the form of github. But pay attention, you need to send the public key. There is a. Pub at end of file. The private key - without the. Pub at the end - must never be put in public.

You will now be able to send code to your account on github.

Notice the detail in their designs for a public url and url yours alone.

And good for you too social coding.

Comments

  • http://blogseopark.blogspot.com/2010/12/nuvenus-chovendus-desafio-seo.html Nuvenus Chovendus

    Wow, I thought I would ever find someone to help me in this.

    He saved my life. thank you.

  • http://blabos.org Blabos of Blebe

    Ha, so empatamos because I thought I would ever find someone who needed it! :)

blog comments powered by Disqus