The difference between Git and Github

In software development, Git and Github are two terms that are often mentioned. Although they are both related to version control, they have different roles and meanings.

Git

Git is an open source distributed version control system, developed by Linus Torvalds in 2005. It can record the modification history of files so that developers can go back to a certain version or branch in the past at any time. Git is a very popular version control tool that is often used to manage the code and content of projects.

Git's distributed version control system means that each developer can maintain a complete code repository locally without having to rely on a network connection. This means developers can work without an internet connection, and can create and modify branches locally without worrying about conflicts with other developers.

The following are some commonly used concepts and nouns in Git:

  • Repository : The place where all the files and history in the Git version control system are stored. Each project has a warehouse, and developers can synchronize and interact between local and remote warehouses.
  • Commit : The operation of saving file modification, and each submission will record the modified file and the modified content. Committing is one of the most basic operations in Git and is at the heart of version control.
  • Branch : An independent line in Git for developing new features, fixing bugs, or experimenting with new ideas. Branches allow developers to experiment and make changes without interfering with mainline development before merging changes into the mainline.
  • Merge : Merge two or more branches into one larger branch. When developers work on multiple branches, they can merge the changes in the branches into the mainline through merging to ensure that all the code is up-to-date and complete.
  • Pull : Download new data from a remote repository and try to merge it into the current branch. Developers can use the pull command to synchronize the latest code in the remote warehouse to the local warehouse for local development and modification.
  • Push (push) : Upload the modification of the local branch to the remote warehouse. Developers can use the push command to synchronize the modifications of the local branch to the remote warehouse to share code and content with other developers.

Github

Github is a Git-based code hosting platform created in 2008 by Chris Wanstrath, PJ Hyett, and Tom Preston-Werner. It provides an online code hosting service that allows developers to collaborate on development in the cloud. Github is a very popular code hosting service, and many open source projects choose to host their code on Github.

The following are some commonly used concepts and nouns in Github:

  • Repository : A place to store code and documentation. On Github, each project has a warehouse, where developers can upload and download code, and collaborate and communicate with other developers.
  • Fork (derived) : Create a new project based on other people's projects, and modify and develop on this basis. Developers can use the Fork command to create a new project on Github, and develop and modify it as their own project.
  • Pull Request (Pull Request) : Send a request to the original author, asking them to incorporate your changes or add them to their project. Developers can collaborate using pull requests to incorporate their modifications and improvements into the project.
  • Issues : Used to track issues or suggestions in the project. Developers can create issues on Github so other developers can help with issues or make suggestions.
  • Star (favorite) : Bookmark an item so that it can be easily found in the future. Developers can use the Favorites feature to keep track of items they are interested in and quickly find them later.
  • Watch (concern) : Used to follow a project's activities, such as commits, issues, etc. Developers can use the Watch function to track the dynamics of the project and keep abreast of major updates to the project.

During the development process, the use of Git and Github can allow team members to better collaborate on development, and make code version control more reliable and convenient. On Github, developers can host code in the cloud, and collaborate and communicate with other developers to better promote the development and improvement of the project.

Guess you like

Origin blog.csdn.net/Austin0101/article/details/129298733
Recommended