Git with cygwin and Google code

1. Install cygwin from http://www.cygwin.com/install.html

2. When you get to the Select Packages section, search for ‘git’ and select all the packages under Devel.

3. Click next and finish installing.

4. Once installed, create a file called .netrc in your home folder. Just do vim ~/.netrc to open a new file. Add the following lines in the file:

machine code.google.com
login your.email@gmail.com
password Cf3Xv4nU3sD5
(from Google code source tab of your Google code project)

5. Then, do the following commands in a cygwin terminal:

git config --global user.name "Your Name"
git config --global user.email you@example.com

6. Then, open up the the file .git/config in your repository folder, after you’ve cloned your repository using the command given on Google code (e.g. git clone https://your.email@code.google.com/p/your-project/)

7. It should say something like:

...
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://your.email@code.google.com/p/your-project/
...

Change the url line so it says: url = https://code.google.com/p/your-project/. (Delete your email).

8. And that’s it! Now you can commit changes and push changes to your Google code repository.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: