search
HomeDevelopment ToolsgitSuper detailed! Github usage tutorial (detailed steps with pictures and text)

This article brings you relevant knowledge about Github. It mainly introduces to you what Github is? How to use Github? Super detailed graphic tutorial~ Friends who are interested can take a look at it below. I hope it will be helpful to everyone.

In recent days, I have discovered that some people are very curious about the Github website, but unfortunately they cannot use it because it is a website for foreigners. First of all, my English is not up to standard. For this, you can actually use Google Chrome to browse Github, which has a one-click translation function. But it is still necessary to introduce some functions and specific operations of Github. Considering that some beginners may not have learned version control tools such as git and svn, I will try not to involve git instructions here.

Without further ado, let’s get to the point.

Github account registration

First search Github on Baidu and enter the Github official website. Super detailed! Github usage tutorial (detailed steps with pictures and text)After entering the official website, we click Sign up to register. Super detailed! Github usage tutorial (detailed steps with pictures and text)There is nothing to say about this step. Enter the username, your email, and password and then conduct an account test. After completion, click Create an account. Super detailed! Github usage tutorial (detailed steps with pictures and text)After completion, go to the second step, where of course you choose a free subscription. Super detailed! Github usage tutorial (detailed steps with pictures and text)After completing the selection, click Continue to go to the third step. The third step is just to ask some questions for you to answer, such as how good are you at programming? How do you plan to use Github? etc. If you don’t want to answer, you can scroll to the bottom of the page and select skip. Super detailed! Github usage tutorial (detailed steps with pictures and text)Click Submit after answering.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

After submission, Github will send an activation email to your registered email address. Just open the email and click the link inside to activate it, so that the account is created. finished.

Resource Search

We use the newly created account to log in. This page will be displayed after successful login. We can search for resources in the upper left corner. Here I take the open source framework OkHttp as an example. You can select the scope and choose to search within your own repository or the entire Github website. Because I don't have this resource in my own warehouse, it searches the entire website by default.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

Enter the keyword and press Enter to start the search and then display the search results.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

The resource we need is the first one. When we click to enter, we can see the entire project structure and source code. Through this green button we can download resources.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

The first red box is the warehouse address, which can be cloned through the git tool. Here we directly select Download ZIP, and the resources are downloaded.

Create a repository

The following describes how to create your own code repository. Super detailed! Github usage tutorial (detailed steps with pictures and text)

On the left side of the web page is your code warehouse. You can click New to create it.

Super detailed! Github usage tutorial (detailed steps with pictures and text)Enter the

warehouse name and description or description of the warehouse, and then click Create repository.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

In this way, the warehouse is created, but the current warehouse is empty and there is nothing, so here it is recommended that you import code from other places or push code Come in. We can click create a new file to create a new file.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

Fill in the file name, and then write some file content at will. When completed, pull the web page to the bottom.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

Fill in the description of the file created this time, and then click Commit new file.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

Now you have the content in your repository.

Team collaboration

The advantage of Github is that it allows the broad masses of the people to participate in the writing of various open source projects. So, how to achieve team collaboration on Github? Through some previous operations, we have created a warehouse, so we will use this warehouse as an example for team development. First you have to add your team members to this repository.

Super detailed! Github usage tutorial (detailed steps with pictures and text)Click Settings to enter the settings page. Super detailed! Github usage tutorial (detailed steps with pictures and text)

Click Collaborators to enter the collaborators page.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

It shows that the warehouse has no collaborators, so we can search for users through the search box below, enter the user's user name or email address to search, and the search is successful. Then click Add collaborator to add the user as a collaborator of this warehouse. At this time, the user will receive a notification, and only if he agrees will he participate in the development of this warehouse. We can also set permissions for members of the team to develop more efficiently.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

Participate in open source projects

How to participate in an open source project, such as the extremely popular bootstrap, which is a very powerful CSS framework, we search bootstrap throughout the website, and then enter the warehouse homepage.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

Then click Fork and a bootstrap repository will be cloned under your account. Then clone from your own account. You must use the git tool here. Enter the git command:

<p>git clone https://github.com/blizzawang/bootstrap.git<br></p>

Note that you must clone the repository from your own account so that you can push changes. If you clone the repository from the bootstrap author's Repository address clone, because without permission, you will not be able to push changes unless the author lists you as a collaborator of the repository, but obviously this is not possible. The relationship between Bootstrap’s official repository twbs/bootstrap, the repository my/bootstrap you cloned on GitHub, and the repository you cloned to your local computer is as shown in the figure below:

Super detailed! Github usage tutorial (detailed steps with pictures and text)

If you want to fix a bug in bootstrap or add a new feature, you can start working on it immediately. After finishing, push it to your own warehouse. If you want the official bootstrap library to accept your modifications, you can initiate a pull request on GitHub. Of course, it doesn’t necessarily matter whether the other party accepts your pull request.

How to merge code

We know that git has extremely powerful cloning and branching functions. In team collaboration, you yourself are the backbone of the team project, and other members are Each has a branch, and everyone works on their own branch without affecting each other, so that the project can be developed most efficiently. When everyone's project functions are completed, it is time to merge the code. When everyone's code is merged and no errors occur, the entire project is completed. So, how to merge code in Github? Taking the warehouse created above as an example, I did some operations here. I used the git tool to clone the warehouse to the desktop. We called it the local warehouse, and then created a new branch in the local warehouse to simulate the operations of the second programmer. , the second programmer created a test2 file and then pushed it to the Github repository through the git tool.

Super detailed! Github usage tutorial (detailed steps with pictures and text)Now we can see that it prompts that the user2 branch has been pushed one minute ago, and then we click Compare&pullrequest to compare and pull the request.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

You will find that these branches can be automatically merged because the contents of the current two branches do not conflict with each other, so we can fill in some instructions about this merger below, Then click Create pull request to merge.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

Continue to click Merge pull request.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

Click Commit to submit. We returned to the warehouse homepage and found that user2's file came in successfully.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

When your submission conflicts with other people's submissions, such as creating a variable at the same time, or modifying the public part of a file at the same time, this Automatic merging is not possible. In this case, you have to use the git tool to update other people's code to your local warehouse, then resolve the conflict locally, and then push it to Github, and others can update their own code.

How to delete the warehouse

Last point, how to delete the created warehouse?

Super detailed! Github usage tutorial (detailed steps with pictures and text)Click Settings to enter the settings page. Scroll the web page to the bottom and select Delete this repository.

Super detailed! Github usage tutorial (detailed steps with pictures and text)Then enter the name of the warehouse and click the button.

Super detailed! Github usage tutorial (detailed steps with pictures and text)

successfully deleted.

Super detailed! Github usage tutorial (detailed steps with pictures and text)Okay, that’s all about the use of the Github website. Of course, it involves some knowledge of git. Regarding git, I think if you want to use Github, you should learn to use git. Because this is a foreign website, sometimes the website delay will be very high. I also recommend a website to everyone. Code Cloud Gitee - Cloud software development collaboration platform. This is a domestic code hosting service website, which is also managed through git, and the Internet speed is much faster.

The above is the detailed content of Super detailed! Github usage tutorial (detailed steps with pictures and text). For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:juejin. If there is any infringement, please contact admin@php.cn delete
Git vs. GitHub: Exploring Their RolesGit vs. GitHub: Exploring Their RolesApr 16, 2025 am 12:06 AM

Git and GitHub are different tools: Git is a distributed version control system for managing code versions and collaborative development; GitHub is an online platform based on Git, providing code hosting and collaboration tools. Git's main features include version management, branch management, and collaborative development, while GitHub provides code hosting, collaboration tools and social networking capabilities.

GitHub: A Hub for Open Source and Software DevelopmentGitHub: A Hub for Open Source and Software DevelopmentApr 15, 2025 am 12:10 AM

GitHub is a Git-based version control system hosting platform that provides version control, collaborative development and community communication functions. Using GitHub can improve development efficiency and code quality.

Git and GitHub: What's the Relationship?Git and GitHub: What's the Relationship?Apr 14, 2025 am 12:10 AM

Git and GitHub are different tools: Git is software for version control, and GitHub is an online platform based on Git. 1.Git allows you to track file changes and collaborative development. 2. GitHub provides code hosting and collaboration tools to enhance team development efficiency.

GitHub: The Platform for Developers and ProjectsGitHub: The Platform for Developers and ProjectsApr 13, 2025 am 12:01 AM

The core features of GitHub include version control, branch management, code review, issue tracking and project management. 1. Version control and branch management are based on Git, allowing tracking of code changes and experimental development. 2. Code review is implemented through PullRequest to improve code quality and team collaboration. 3. Issues tracking and project management are carried out through Issues and the project management board to improve project transparency and traceability.

GitHub in Action: Examples and Use CasesGitHub in Action: Examples and Use CasesApr 12, 2025 am 12:16 AM

GitHub is a powerful tool to improve the efficiency and quality of software development. 1) Version control: manage code changes through Git. 2) PullRequests: Conduct code review and improve code quality. 3) Issues: Track bugs and project progress. 4) GitHubActions: Automate the construction, testing and deployment process.

Git vs. GitHub: Version Control and Code HostingGit vs. GitHub: Version Control and Code HostingApr 11, 2025 am 11:33 AM

Git is a version control system, and GitHub is a Git-based code hosting platform. Git is used to manage code versions and supports local operations; GitHub provides online collaboration tools such as Issue tracking and PullRequest.

What is Git in simple words?What is Git in simple words?Apr 09, 2025 am 12:12 AM

Git is an open source distributed version control system that helps developers track file changes, work together and manage code versions. Its core functions include: 1) record code modifications, 2) fallback to previous versions, 3) collaborative development, and 4) create and manage branches for parallel development.

Is Git the same as GitHub?Is Git the same as GitHub?Apr 08, 2025 am 12:13 AM

Git and GitHub are not the same thing. Git is a version control system, and GitHub is a Git-based code hosting platform. Git is used to manage code versions, and GitHub provides an online collaboration environment.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft