Easy to use under Github:windows

Source: Internet
Author: User
Tags using git version control system

There's a lot more on GitHub this time in the blog park, but I don't really understand. However, these days simply read the information, personal operation has a little experience. This is the simplest kind of github primer, basically all mouse operation. This is also the summary of these days, and we share. If there is anything wrong or inappropriate in the text, I hope you will correct me in time. The content of GitHub is mainly referenced in Gotgithub.

1. Background and purpose

Last year, a teacher recommended using GitHub to manage his code. There's a lot of information about GitHub on the home page of the blog park this time. More than half a year, I have done most of the things I have done a detailed record, hoping to keep their work. Some experience with the work itself, take the form of documentation, after the completion of the modification is not so frequent, but the code is not the same. Most of the time, I do find that I need to tidy up my code, for example

is a failure example, most files within a folder have similar functionality, but there are some differences. Well, actually, when I was looking for a piece of code, I couldn't find it myself ... On the homepage of the GitHub introduction are more advanced, to tell the truth I do not understand how to read. So the purpose of this article is to use my experience of the past few days to introduce the simplest of GitHub for Windows (https://windows.github.com/) applications. (in writing this paragraph, found that the blog Park is still a very basic introduction, such as http://www.cnblogs.com/Yiutto/p/4665012.html)

2. Git and GitHub

"GitHub (URL https://github.com/) is a managed platform for open source and private software projects, because Git is only supported as a unique repository format for hosting, so it's called GitHub. "(http://www.worldhello.net/gotgithub/01-explore-github/010-what-is-github.html)

Git is a distributed version control system. Version control, there is really not a lot of demand for projects that have a single person involved with me. I need to save my code and be able to easily view it, and can modify it at any time without being restricted by the network. According to my changes, even if the update code, and provide the comparison before and after the update, update the description record, and according to the update record, you can find the code before the modification. In addition to the comments in the code, I would also like to be able to explain the whole project, not only to help others understand what this is, but also to remind themselves of what this is, and what needs to be modified. These requirements are easily met, of course, the charm of git is far from this.

Gotgithub has a concise image of the git description. For one of your open source projects, the participants will not only be you, but also the core developers and the peripheral developers who want to join you. And you might want to join someone else's Open source project. How does git reconcile the relationships between these categories of people? I'm definitely not good at it here, so go here and see ...

3. Establish repository

Repository: Version library

Account registration and software installation and so on (note: After the account registration, the name displayed before your repository is not changed), creating a new repository is the first step (you can also fork other people's repository, this first, because I did not do). The operation of the Web page is very simple, there are detailed help, this process is done on the Web page can be. Just specify the name, description (optional), tick on the readme, whether to add gitignore (not quite understand, see ignoring files), add the appropriate license. Click on the button to create the repository.

Run GitHub for widnows, log in to your GitHub account, click ' + ' in the top left corner and select clone to copy the repository from the cloud to a local location.

Only Readme and ignoring files may be available in the newly created repository. Any changes in the repository (file additions, deletions, and modifications) are reflected in the changes, the green representation of the file name is added, and the red means that the content is deleted. After completing the changes, write the title and content of this commit, you can click on the Commit button to upload the changes. If you have modified the repository elsewhere, you will need to click the Sync button to get the latest repository before you can upload the changes.

Any commit is recorded in the history, where you can view the content submitted, compare the changes before and after the commit, and even undo the changes (by resubmitting the changes). The changes (left) and history (right) are displayed respectively.

4. Readme and Other Notes

The need to go back to section two, one of which is "in addition to the comments in the code, I also want to be able to do a specific description of the whole project, not only to help others understand what this is, but also always remind yourself what this is, and what needs to be modified."

In the third section, the initialization of the Readme played this role, the Readme will be displayed under the Repository (Web page), such as

The. md suffix of the Readme file is described in section fifth, using Markdown,markdown basic syntax. Open the Readme.md file, edit it, don't worry, you can also find a markdown editor (reference), or choose an online editor. GitHub also offers other ways to show the content and functionality of the entire repository.

Simple operation will be able to create a beautiful project homepage, in the Repository settings, click ' Launch automatic page generator ', the use of markdown tag content, then select the appropriate template to create a beautiful project home page, project home domain name < User-id>.github.io/<project-name>, such as http://caowenhui.github.io/LDPCC/.

Here I directly add the contents of the Readme to the Project home page, the effect is (depending on the template selected, you can write your own)

After the Web page has created the main project, after you synchronize with GitHub for Windows, you will find that the repository has more than one branch named Gh-pages. When we create a new repository, a master branch is created by default. So what is the branch for? Using Git to create a new branch and a branch of management refer to this issue, if you want to test a feature and do not want to change the contents of the main branch, then a new branch can be created to replicate the entire contents of the main branch.

While Gh-pages is a special branch, Gh-pages does not contain the contents of the main branch, and when a static web page is added to Gh-pages, GitHub automatically invokes the content within that branch.

5. Markdown Basic Syntax

In general, the basic format and content to be used when composing a document include the following

    • Title and heading levels
    • Lists and ordered lists
    • Hypertext links
    • Image

Here's a brief introduction to the basic syntax, and more on http://www.appinn.com/markdown/#p.

The title is usually in the following way, that is, by the # logo which is the title, by the number of # identified this is a few levels of title

# This is level one title # # This is level two heading ###### this is level six heading

Lists have *,+,-identities, such as

*   Red*   Green*   Blue

The sequence list is marked by the '. ' in English, note that a space is required before the content (the number of ordered lists does not necessarily need to be ordered, but is recommended)

1 .  Bird2.  McHale3.  Parish

Pictures and hyperlinks have the same form (before the picture has a '! ') ), which is the form of [text] (link).

Hyperlink representation: [Blog] (http://www.cnblogs.com/sea-wind2) picture representation:! [Ber Curve] (/ber.png)
6. Other

The simplest usage instructions, the function is far from over. One of the most important things is how to work with others? This person may refer to a team of collaborators or other programmers who are interested in the project, or who are not proficient in programming but have some insight into the project. Fork,pull,issue on GitHub and so on, here is not to do the explanation, because I have no experience.

Easy to use under Github:windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.