Document directory
- Generate your public key
- Set the public key of the GitHub account
- Set your email and nickname
- Clone your project
- Configure username and token on your GitHub
GitHub help: https://help.github.com/articles/create-a-repo
In the previous article, After configuring git server on Ubuntu, you need to install the client locally and start to configure the GIT development environment. First from Google
Codedownload the latest gitinstallation package msysgitfor windows. When I download git-1.7.4-preview20110204.exe, the installation starts:
Install msysgit
Next step
Agree to the GNU Protocol
Select the installation location and next step
Select TrueType front and click Next.
Do not create a Startup Folder
Git bash by default.
Choose to use OpenSSH
Select the default checkout Style
Installation Complete
Configure local git
After msysgit is installed, you can configure the development environment and create a new folder git in your working directory, such as my
Right-click the GIT folder and select git Bash here. The shell command line interface is displayed.
Generate your public key
Enter the command
Ssh-keygen-c "your email address"-T RSA
An SSH key will be generated for you. Then, you will be asked about the location of the file to be saved, set the password, and press enter, press enter, and press Enter. The default password is OK.
Because it is mainly used locally, you can press enter directly without a password!
Now we have generated sshkey for you.
Set the public key of the GitHub account
If you have a GitHub account,
Log on to the GitHub. com website and set your SSH public keys in SSH public keys.
Create a data warehouse
Set related information
Set your email and nickname
Now back to your working directory, you can choose to set your default email and nickname
Enter the command
Git config-global user. Email your email address git config-global user. Name "Arthur"
Clone your project
Right-click your working directory git, select git GUI, and select clone existing version Library
Enter your GitHub Project address, for example
git@github.com:caijiamx/Magento-Theme.git
A dialog box is displayed to show you whether to trust GitHub. Enter yes.
Then the data will be pulled from GitHub,
The previous section briefly introduced how to clone a version library. Now we are about to officially start working.
Git development under the command line
Create a work folder, right-click git bash, and enter
ssh git@github.com
Select Yes and add it to hosts.
Trust git@github.com site
Configure username and token on your GitHub
Set your GitHub User Name
git config –global github.user caijiamx
Set the token of your git account
Git config –global github.token your token
This token is found on the right side of GitHub, com account settings-> account admin.
Let's start pulling data from the GUI as described above. Now we start your project from the command
Development under git
Add a description file for your project
Touch readme.txt // enter Hello World
Add the new file to the temporary storage area and enter the command
git add readme.txt
Submit your changes
Enter the command
git commit –m "first commit"
Add a remote server repository and enter the command
git remote add origin git@github.com:directoo/Magento-Theme.git
Submit your changes to the server and enter the command
git push origin master
Reference resources
GitHub set up git
How to Set Your SSH key
GitHub official help tutorials
Configuration before the first running of Git
Reprinted from: http://www.xbc.me/install-git-on-windows/