In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what are the beginner knowledge points of Github". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what are the beginner knowledge points of Github.
What is GitHub?
It is well known that GitHub is a hosting platform for open source and proprietary software projects, and not only that, it has attracted a large number of programmers since the launch of GitHub. In this platform, GitHub not only has its own Git code repository hosting, but also has a basic Web management interface, not only that, but also provides subscription, discussion groups, text rendering, online file editor, collaboration graph (report), code fragment sharing (Gist) and other functions. And at present, there are a large number of managed versions, among which there are many well-known open source items.
Step 1: create a warehouse
In GitHub, a warehouse is usually used to organize a separate project. And the warehouse can contain all the files in your project, such as folders, files, pictures, videos, spreadsheets, datasets, etc. But here the editor suggests that you can include a README file, or a custom file that you use to record project information, so that GitHub will add it by default when you create the repository, and we also provide permission permission options when we create it. In your own GitHub, you can use your repository to store your ideas, resources, and even use it to share and discuss anything with others.
Create a new warehouse step:
In the top right corner of the page, to the left of your avatar, click "+" and select "New repository" in the pop-up drop-down option.
Enter your warehouse name in the warehouse name input box. Here the editor uses "hello-world".
Write a short description yourself.
Check "Initialize this repository with a README".
Click the "Create repository" button to complete the creation.
Step 2: create a branch
For branching, it is a method that allows you to work in different versions of the same warehouse at the same time.
And there will be a main branch in your repository called "master" by default, which is used to store your final version code. And we can also use other sub-branches to edit and change, determine and then submit to the main branch.
In fact, the moment you create a child branch from the main branch, you make a copy of the main branch at that point in time. If someone from another branch makes updates to the main branch later, you must pull those updates from the main branch before you submit to the main branch.
The following chart shows the entire process of branch collaboration:
Main branch
A new subbranch named "feature" (because we are developing on this branch)
The process before the "feature" branch was merged into the main branch
Have you ever saved different versions of the file as follows?
Story.txt
Story-joe-edit.txt
Story-joe-edit-reviewed.txt
The branch in the GItHub repository is designed to accomplish similar functions.
On GitHub, our developers, editors and designers complete their own work of modifying bug or functional writing on separate branches. When a function is written and determined, they merge their own branches into the main branch.
Create a new subbranch
Enter your "hello-world" warehouse
Click the drop-down box at the top of the file list that says "branch: master"
Enter the new branch name "readme-edits" in the input box
Click the branch creation box in the blue background below or press the "Enter" key of the keyboard directly.
Now you have two branches, "master" and "readme-edits". They look almost identical, but don't worry. Next, we'll make some changes in our new sub-branch.
Step 3: make changes and submit
Now that we are on your new branch "readme-edits", let's write something about it.
Unlike our usual editors, saving changes is called "commit" in GitHub. Each submission requires a comment on why we made the change. These notes will record your changes, and other partners will know what you submitted each time.
Make changes and submit
Click the "README.md" file to switch to the "README.md" content page
Click the pencil button in the upper right corner of the edit box to enter the editing interface
In the edit box, write some information about yourself
In the "submit changes" box below, enter a note for you to make this change
Click the "Commit changes" button below
These changes are only for the "README.md" file located in your "readme-edits" sub-branch, so now the content on this branch is different from that on the main branch.
Step 4: issue a "request code merge" request
Now that you have made changes to your new branch, we can make a request for code merge.
Requesting code merging is a core feature of GitHub team collaboration. When you issue a "request for code merge" request, you are asking someone to copy your current code for review, and then download your code and merge it into their branch. The request will show different parts on all branches. Any changes, additions, and reductions you make will be shown in green and red.
Before your code is finished, you can submit the code, initiate a request for a code merge, and have a discussion at any time.
You can use GitHub's "@" function to give feedback to a specific person or team every time you make a "request for code merge" request, whether that person is with you or thousands of miles away.
You can make a "request for code merge" to your warehouse and merge them yourself. This is a very good practice before you come into contact with a large project.
Issue a request Code merge request for the changed README file
Step 1: click the "Pull Request" tab button, switch to the request code merge page, and click the green "New pull request" button.
Step 2: select the "readme-edits" branch you created and compare it with the main branch.
Step 3: review these changes on the comparison page and make sure they are the ones you want to submit.
Step 4: when you are sure that these changes are what you want, click the green "Create Pull Request" button.
Step 5: make a simple title and description of your changes.
When you have written the complete note description, click the "Create pull request" button.
Tip: you can use the emoji emoji or drag the image to the comment window to comment.
Step 5: merge your "request Code merge" request
This is the last step in the process, and it's time to merge the changes you made in the sub-branch "readme-edits" into the main branch "master".
Click the green "Merge pull request" button to merge these changes into the main branch
Click the "Confirm merge" button
Since the changes to this branch have been merged, we also need to click the "Delete branch" button in the purple box to delete the branch.
Thank you for your reading, the above is the content of "what are the beginner knowledge points of Github". After the study of this article, I believe you have a deeper understanding of what the entry knowledge points of Github novice have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.