Skip to content

AoiKuiyuyou/AoikGithubHowto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

AoikGithubStart

Start guide for Github.

Slightly tiled towards Windows platform.

Contents

Install Git

Git is available at here.

Install TortoiseGit

GUI git client is handier for me and the one I prefer to use is TortoiseGit.

TortoiseGit depends on programs shipped with Git to work. So make sure to install Git first.

TortoiseGit is available at here.

After the installation, some menus will be available when you right click a blank area.
More will be available if you are clicking inside a git repository dir.

Configure TortoiseGit

Name and Email

Each git commit will include the commit author's name and email.
We need to configure the name and email in TortoiseGit.

Right click a blank area, select menu TortoiseGit - Settings.
Image

In the Git tab, enter your name and email.
Image

Install Putty

You need to use Putty's PUTTYGEN program to convert private key to Putty's ppk format,
as TortoiseGit only supports this format.

Putty is available at here.

Generate private and public keys

The communication between Github's git server and our git client (i.e. TortoiseGit) is via SSH protocol. And public-private key authentication is required. Therefore we need to create our public and private keys.

To generate keys, we need program ssh-keygen. Luckily, a ssh-keygen.exe program is shipped with Git.
Assume Git's root dir is git_root_dir, the program should be found at

git_root_dir\bin\ssh-keygen.exe

With the program available, the command to generate keys is:

ssh-keygen -t rsa -b 2048 -N "" -C AoiKuiyuyou -f AoiKuiyuyou
  • -t rsa
    Key type is RSA.
  • -b 2048
    Key length is 2048.
  • -N ""
    Do not password-protect the key.
  • -C AoiKuiyuyou
    Add comments AoiKuiyuyou to the end of the public key file.
  • -f AoiKuiyuyou
    Name the private key AoiKuiyuyou. The public key will be named AoiKuiyuyou.pub accordingly.

Add public key to Github

Go to this page to add your public key.

Convert private key to Putty's ppk format

Run program PUTTYGEN.EXE installed in this step.
Load the private key.
Save it as Putty's ppk format.

Create a repository on Github

Go to this page to create a repository.

The only thing that has to be specified right now is Repository name.

Find the repository's URLs

For example, my Github username is AoiKuiyuyou, and my repository's name is AoikGithubQuickStart, so the HTTPS protocol URL for my repository is

https://github.com/AoiKuiyuyou/AoikGithubQuickStart

The SSH protocol URL for my repository is

[email protected]:AoiKuiyuyou/AoikGithubQuickStart.git

Clone the repository

Now that you have found your repository's SSH URL, you can clone it to local.

Open the dir where you want to put the cloned repository, right click Git Clone...
Image

Enter your repository's SSH URL and your Putty ppk private key's path
Image

Click Ok.

After cloned the repository to local, you should be able to push changes back to remote.

Prepare a README.md file

If a repository has a README.md file in its root dir, Github will render it as part of the repository's page content. (This page's README.md for example.)

A README.md file is written in GitHub Flavored Markdown.

Here are some readings:

Here are some WYSIWYG online Markdown editors:

Here is Github's official tool to render README.md file to html.
You can use it to render locally if online editors are not preferred.

About

Start guide for Github.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published