I. Introduction
Creating helloword is a traditional and effective way to learn programming. Now this simple exercise will take you to learn a brand new thing -------- GitHub!
GitHub provides a team and work platform. You don't have to worry about data loss or worry about managing projects on multiple computers, because GitHub is distributed and asynchronous. Most importantly, the features such as GitHub make it easier for you to collaborate with your team.
The following are the key points of GitHub:
Repositories, branches, commits, issues, and pull requests ).
You will go further with GitHub.
The installation and code space will be completed in github.com. Here you do not need to know the command line and install git, or even how to code the code. You only need a GitHub account, if you do not have one, register one! 2. Creating a repository is a basic unit of GitHub and the most common project. A repository can contain folders or files, images, and other things that your project needs. Therefore, we recommend that you include a ReadMe file in each project to describe this project. Therefore, GitHub provides a simple readme file creation option when you create a project. It also provides other common options such as a license file, but currently we can skip.
1. Click the + button next to the user name in the upper-right corner of your GitHub homepage. 2. Name your repository, for example, helloword3. Write a simple description. 4. Create a ReadMe file for this repository.
5. Click Create repository. Created successfully! 3. Writing an issues issue is not just a repository, but may be a bug, a feature requirement, a problem or many other things that can be tagged on GitHub, search and assign problems to simplify management of an active project. Now you have an empty warehouse. It can use readme to let people know what the project is. Now write the issue!
- Click the issues tab on the edge
- Click New Issue
- Enter the title and description
Click Submit new issue. In this case, this issue has a URL Connection, and you can even directly access this issue with a URL.
Next, edit your readme and disable issue. 4. Create a branch. Create a branch by writing different branches in a warehouse.
A default branch master exists when you create a warehouse. You can continue to work on this branch, but when you have a new idea one day, you can create another branch on this basis to practice your idea without being bound by the original master branch.
When you create a branch, you actually copy an existing branch. You can modify multiple branches at the same time. When the main branch changes, don't worry, you can update and merge sub-branches at any time.
At ordinary times, you may save files of different types as stored story.txt ", stored story-joe-edit.txt", and stored story-sue-edit.txt "in this way, but it is easier to implement the same management of GitHub.
On GitHub, developers, authors, and designers use branches to fix bugs and practice new ideas. When fixing bugs or implementing new ideas, you can merge them to the main branch at any time.
Step: 1. Go to the new repository helloword2, click branch: master3 in the drop-down list, enter the branch name readme-edit, and then click Create
Now you have two branches, one master Branch and one sub branch. Now they are the same, but we will modify them later and merge them. Once a commit is saved on GitHub, it is called a commit. It is very proud because it is the development history of your project. Each commit is associated with a commit description message, which contains why you have made these changes. This information allows others to better understand what you have done.
Next, open the Code view of the readem-Edit branch and make some changes. Submit changes 1. Click readme file 2. Click Edit 3. On the Edit page, write something to write your own information. 4. Compile message information.
Click Submit for modification, and the README file is modified in your readme-Edit branch. Now there is a different content in the main branch and sub branch. 5. Opening a pull request (merge request) is the core of the GitHub team's cooperation. When you propose a pull request, gtihub allows you to compare the differences between the two branches, prompts about which are changed, which are new, and the green ones can be merged or the red ones cannot be merged. Once you make the modification, you can submit a merge request. By using the @ mention system to send messages to your request, you can request feedback from specific people or teams. You can even merge sub-projects and sub-projects to develop larger projects,
Create a merge request for the README file
| Procedure |
|
| Click the pull request button, and then click the green pull request button on the pull request page. |
|
Select the branch you created,readme-edits, AndMaster branch comparison |
|
| Check your modifications and make sure you want to submit the changes. |
|
| Click the green button to submit your changes. |
|
| Write a title for your submission, because it directly affects an issue problem, and finally write a brief description. |
|
But after everything is OK, click send pull request!
Merge requests now it's time to merge your modified branches. 1. Click the green button to merge your modifications to master2, click confirm merge.3, and continue or delete the sub-branches, after the merge is successful, you can click Delete branch to delete the branch.
CongratulationsYou have successfully made a merge request.
Note: The first time I translated a foreign language, because I am not good at English, I have completed the translation with the help of the translation software. Thank you for reading this translation.