GitHub Web version start tutorial __github start tutorial

Source: Internet
Author: User
Tags time zones

Hello World

Reading time: 10min

In computer programming, theHello World Program is a long tradition. It's a simple exercise that lets you start quickly when you're learning something new, and start GitHub it now.

you will learn to create and use a library to start and manage a new branch to modify a file and submit it to GitHub open and merge a merge request what is GitHub.

GitHub is a code-managed platform for versioning and collaboration. It allows you and others to work together on projects anywhere.

This tutorial will teach you some of the elements of GitHub, such as: libraries, branches, submissions, and merge requests. You will create your own Hello World and learn about the workflow of merging requests on GitHub, a tidal flow method for creating and checking code. no need to encode

To complete this tutorial, you need to have an account on the GitHub website and networking. You don't have to know how to become, use the command line, or install git (GitHub version control software).

Small Suggestion: Open this tutorial (or tab) in a separate browser window so you can complete the tutorial steps while you're at the tutorial.  Step 1. Create a library

A library is often used to organize a separate project. Libraries can contain: folders, files, pictures, videos, spreadsheets, and datasets-anything you need for your project. We recommend that you include a Readme file in your project or a file that introduces the approximate information about your project. GitHub for convenience, add one at the same time you create your new library. It also provides other similar options such as a license (license) file.

Your Hello-world library can be a place where you can store your ideas, resources, or even share and discuss things with other people. Create a new library

1. In the upper right corner, close to your avatar, click + and then select New repository

2. Give your library a name of Hello-world.

3. Write a small description (at Description )

4. Select Initialize this repository with a README.


Click Create repository Step 2. Create a branch

A branch is a way in which libraries work in different versions at the same time.

system defaults, your library has only one branch named Master, which is considered the final branch. We use other branches to do experiments and edit the modifications before submitting them to the Master branch.

When you create another branch outside of the master branch, you are making a copy or a snapshot of the master branch at that time. If others have made changes to the master branch when you are working on your own branch, you can crawl those updates.

This chart shows the following:

Master Branch A new branch called feature (because we are doing ' functional work ' on this branch) merged into Master Zhiqian feature must go through the process


Have you ever saved a different version of a file? Like this:

Story. TXT story-joe-edit. TXT Story-Joe-edit-checksum. txt

Branching on the GitHub library accomplishes a similar goal.

On GitHub, our developers, writers, and designers use branches to modify bugs and functional work from the master branch. When a modification has been determined, they can be merged into the master branch. to create a new branch

1. To your newly created Hello-word library

2. Click on the top of the list of files called Branch:master

3. Enter the name of a branch, readme-edits, the text box to the new branch

4. Select this blue Create branch option or enter directly into the carriage


Now you have two branches, master and Readme-edits. They look exactly the same, but not for long. Next, we'll make some changes to the new branch. Step 3. Make and submit changes

Great. Now that you're looking at your Readme-edits branch, it's a copy of the Master branch. Let's make some changes.

On the GitHub, the save modification is called commits (commit). Each submission is associated with a commit message (submission), which is a description of why the modification was made. Submitting information records the history of your changes so that other collaborators can understand what you have done and why. make and submit changes

1. Click Readme.md file.

2. Click on the icon of the pencil in the upper right corner to edit the interface.

3. In the editor, write something about yourself.

4. Write a submit information about your changes.

5. Click the Commit changes button.


These changes are only for the README file on your reademe-edits branch, so the contents of this branch are not the same as the Master branch. Step 4. Open a merge request

Beautiful editors. Now that you have a different branch of the master that distinguishes it, you can open a merge request.

The merge request is the core of collaboration on the GitHub. When you open a merge request, you are proposing your changes and asking others to examine and absorb your contributions and merge them into their branches. A merge request embodies the differences and differences in the contents of two branches. These modifications, additions and deletions are shown as green and red.

Once you have made a submission, you can open a merge request and start the discussion even before the code is complete.

By using the GitHub system to submit your consolidated request information, you can ask for feedback from a specific person or team, whether they are downstairs or outside of 10 time zones.

You can even open a merge request in your library and merge them yourself. This is a good way to learn the GitHub process before working on a big project. Open a merge request for the Readme modification

Steps:

1. Click the Pull request tab, and then from the Pull request page, click the green button called New Pull request


2. In the Example comparisons selection box, select the changes made by the Readme-edits branch in contrast to the master branch


3. Check your changes in the difference comparison page to make sure they are really what you want to submit.


4. When you are sure that these changes are the one you want to submit, click on the Big green button-Create Pull Request


5. Name your merge request and write a brief description of your changes.


When you have completed your message, click the Create Pull request button.

tip: You can use expressions and drag-and-drop or screenshots and move diagrams in comments and merge requests. Step 5, merge your merge request

In the final step, it's time to get your modifications together-to merge the Readme-edits branch into the master branch.

1. Click the green button-mergepull request to merge these changes into master.

2. Click ConfirmMerge (confirm merge).

3. Go back to the front and delete the branch, click the Delete Branch button in the Purple box, because its modification has been included.

Congratulations.


By completing this tutorial, you have learned how to create a library and make a merge request on GitHub.

Tutorial Summary:

Create an open Source Library start and manage a new branch modify a file and submit these changes to GitHub open and merge a merge request

Take a look at your github avatar and you will be able to see a new contribution to the plaza.

To learn more about merging requests, we recommend reading this site GitHub flow Guide

You may also be able to visit GitHub explore to participate in an Open-source project.

Little advice: Watch our other tutorials, YouTube channels, On-demand training Learn more about how to get started with GitHub.



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.