Because some people are very interested in translating this project, but do not know how to join in, here I wrote a short tutorial on how to use Git to participate in the translation of this project.
Project on GitHub address:
Https://github.com/luoyhang003/linux_2.6.1_docs_translation_chinese
I hope we can all go to a star support!
This article takes the Linux system as an example, the Windows system download installs the git after the procedure basically is consistent.
First, the first step is to apply for a GitHub account:
https://github.com/
Step two, install Git
Linux:
sudo apt-get install Git-core
To complete the installation.
Windows:
Download git:
Http://msysgit.github.io
The third step is to create the Code warehouse:
git config--global user.name "Your name"
git config--global user.email "[Email protected]"
This will tell you who submitted the code after the configuration is complete.
After the configuration is complete, you can use:
git config--global user.name
git config--global user.email
To see if the configuration was successful
So we can start creating the code repository:
Create a new directory to put this translation project, and then CD to this directory.
git clone https://github.com/luoyhang003/linux_2.6.1_docs_translation_chinese.git
And then you clone this project on GitHub to your computer in your directory.
Fourth step, start translating:
Directly in the document you cloned directly, as for the format of the translation, please refer to the document I have translated.
Fifth step, submit the changes:
Some people may ask, have already translated, how to submit it? Now let me tell you:
Use the command:
CD switch to your project directory
git Add. #将你修改的全部文件添加
Git commit-m "Something"
#将something改为你这次所修改或翻译的内容, so that others look clearer and know what you have done with this submission
Git push Origin Master
#这样就将你的修改或者翻译添加到了Github上
During the period you need to enter GitHub's account number and password, as prompted to enter the good.
Sixth step, get remote modification:
Because while you are translating, others may also be translating, for how to get someone else's changes and update your local documents we use this command:
Git pull Origin master #相当于以下三步的综合
Or: (recommended)
Git fetch Origin Master #将远程版本库代码同步到本地
git diff origin/master #查看远程版本库修改了哪些东西
git merge origin/master #将修改合并
At this point, we can happily join in our project!
=================================================================================
Also attached: Some simple git commands:
Create your own code repository: git init
Add a single file : git add file.c
Add folders: git Add folder
View branches: git branch-a
Create a branch : Git branch version1.0
To view changes to a remote library: Git fetch Origin Master
git diff origin/master
Also attached:
Git tutorial website (personally feel very good)
http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000
For a short tutorial on adding a Linux kernel document translation