Official link Address
http://guides.github.com/activities/hello-world/
The Hello World Project is a historic tradition in the computer programming community. This project is a simple exercise when you start to learn something new. Let's start with GitHub!
You can learn how to do it:
- Create and use a repository
- Start and manage a new branch
- Make changes to a file and push them to GitHub for submission
- Open and merge an extract request
What is GitHub?
GitHub is a version-controlled and collaborative code-management platform. It allows you to work on projects with others in any location.
This tutorial teaches you the basic points of GitHub, such as repository, Branch, commit, extract request. You will create your own Hello World repository and learn GitHub's pull request workflow. This workflow is a popular way to create and review code.
No need to write code
In order to complete this tutorial, you need a github.com account and Internet access. You don't have to know how to program, use the command line or install Git (GitHub-based version control software).
Tip: Open this guide in a separate Browse window or tab so that you can see it when you are finished with the steps in this tutorial.
Step 1. Create a repository
A repository is often used to organize a separate project. Repositories can contain folders and files, pictures, videos, spreadsheets, and data collections-anything that you project. We recommend that you include a Readme (description file) or a file that contains information about your project. And GitHub makes it easy for you to create your new repository. It also provides other common options such as an authorization file.
Your Hello-world repository can store your thoughts, information, and even what you share and discuss with others.
To create a new repository
1. In the upper-right corner, near your name, click the + sign and then click New Repository.
2. Name your warehouse hello world
.
3. Write a brief introduction.
4. Select intialize This repository with a README(initialize this repository with a description file)
Click Create repository(creating repository): Tada:
Step 2. Create a branch
A branch is a method that works on different versions of a repository at the same time.
There is a branch in your repository that has a name master
, and this branch defaults to a decisive branch. master
before giving, we use branches to experiment and edit.
When you create a branch separate from the master
branch, you are copying or copying master
at that point in time. When you are working on your branch, others master
make changes to the branch, and you can extract the updates.
This illustrates the following points:
- Main Branch
- A
feature
new branch called (because we're doing ' special work ' on this branch)
- The
feature
master
route that it traveled before it was merged into
Have you ever saved a different version of a file? Just like:
story.txt
story-jop-edit.txt
story-joe-edit-reviewed.txt
In GitHub's repository, branches perform similar tasks.
At GitHub, our inventors, authors, and designers are using branches for bug fixes and important work, which are separated from our master
branches. When a change is ready, they merge the branches into master
.
To create a new branch
1. Come to your new repository hello world
.
2. Click master
the drop-down menu of the top file ()
3. Tap the name of the branch, readme-edits
and enter the new branch file box.
4. Select the Blue Create branch
box or click "Enter" on your keyboard.
Now you have two branches, master
and readme-edits
. They look exactly the same, but not for long!
Step 3. Make changes and submit
Great! Now, for your readme-edit
branch ( master
the copy), you are on the Code view. Let's do some editorial work.
On GitHub, save changes are referred to as commits. Each submission has an associated message. This information is a description that explains why special changes are made. Submitting information captures the history of your changes so that other collaborators can understand what you have changed and what the purpose is.
Make changes and submit
- Click
README.md
file.
- Click the pencil icon in the upper right corner of the file view to edit it.
- In the editor, write something about yourself.
- Click the Commit changes button.
These changes will only appear in the files in your readme-edits
branch, so now the content in this branch is different master
.
Step 4. Open an extract request
Beautiful editor! Now that you master
've made a change in the split branch, you can open an extract request.
Extracting requests in Hithub is the core of cooperation. When you open an extract request, you are suggesting that you are proposing your changes and asking someone to review and extract your contributions and incorporate your contributions into their branches. These changes, additions and deletions will be shown in green and red.
Once you commit, you can open a pull request and start a discussion, even before the code is complete.
By using GitHub's [@mention system] on your fetch request (http://help.github.com/articles/about-writing-and-formatting-on-github/# Text-formatting-toolbar the notification bar, you can ask for feedback from a specific person or team, whether they are in the lobby or 10 time zones apart.
You can even open pull requests in your personal repository and merge them yourself. The following is a great way to learn about GitHub before you learn a bigger project.
To open a fetch request in order to modify the Readme file
* Click on the image to get a larger version
Steps |
Screen |
Click on the Pull requst tab and click on the green New Push request button from the Submit requests page |
|
Select the branch you created, readme-edits and master compare the branches |
|
Check your changes between different versions, and they are the things you want to commit |
|
When you are satisfied with what you want to submit, click on the Big Green creat pull Request button |
|
Give your submission a name and write a brief description of your changes |
|
When you are finished with your information sheet, click Create pull Request!
Tip: You can use [emoji] (http://help.github.com/articles/basic-writing-and-formatting-syntax/#using-emoji in the comment area and the submit request area and dragging pictures and animated pictures
Step 5: Merge your submission request
1. In the final step, it is time to integrate your changes- readme edits
merge your branches into the master
branch.
2. Click Confirm Merge.
3. Continue because the changes have been merged, so you can use the Delete Branch button in the Purple box to delete the branch.
Celebrate it!
By completing this tutorial, you have learned how to create a project in GitHub and submit a request.
Here's what you've done in this tutorial:
- Create and hit the source repository
- Start and manage a new branch
- Change a file and submit these changes to GitHub
- Open and merge an extract request
Take a look at your GitHub config file and you'll see your new [Contribution squares] (http://https://help.github.com/articles/viewing-contributions!).
If you want to learn more about the Extract request command, we recommend that you read the GitHub Flow Guide.
You can also visit GitHub explore and participate in a new Open source project: Octocat:.
Tip: Check out our other guides and [YouTube Channel] (http://http://youtube.com/githubguides to learn more about new GitHub beginners!)
Last followed the new in February 2016.
2016-03-10 23:51:58 Thursday
From for notes (Wiz)
GitHub Official Introduction