Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to download and install Git

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how to download and install Git. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

version control

Individual development requires continuous improvement and iteration, and teams need to collaborate internally. Such requirements are met by version control tools. What needs to be understood is that version control is just an idea, and version control tools are an implementation of that idea.

(1)Centralized version control tools: CVS, SVN, VSS…

Each developer is a client, and files and version information are stored on the server. The downside is that it is prone to a single point of failure: once the server goes down, all historical data is lost.

(2)Distributed version control tools: Git, Mercurial, Bazaar, Darcs…

Version control can be done locally. It effectively avoids single point failure.

Features of version control tools

Version control tools have the following functions:

(1)collaborative modification

Multiple people modify the same file on the server side in parallel.

(2)data backup

Save not only the current state of directories and files, but also the historical state of each commit.

(3)version management

When saving the file information of each version, we should not save duplicate data, so as to save storage time and improve operation efficiency. SVN takes an incremental approach to management, while Git takes a snapshot of the file system.

(4)authority control

Control permissions for developers on the team; review code contributed by developers outside the team (Git only).

(5)history

View who modified, modified time, modified content, log information; restore local files to a historical state.

(6)branch management

Allowing development teams to work on multiple production lines simultaneously, further improving efficiency.

About Git

Linux was originally developed with source code from all over the world, and Linus manually compiled and merged the code himself, which was a complicated task.

In 2002 BitMover licensed BitKeeper as a free trial version control system to the Linux community for humanitarian reasons, but did not allow cracking.

In 2005, Andrew, who developed Samba, tried to crack BitKeeper's protocol, but BitMover discovered it and wanted to take back the Linux community's free trial rights; Linus himself developed a distributed version control system in C, Git, and a month later the Linux system code was managed by Git.

In 2008, GitHub was launched, jQuery, Ruby, PHP open source software all put their source code on GitHub for hosting, and now GitHub has tens of thousands of good projects.

Git's advantages

Most operations are done locally and do not require networking.

Integrity assurance. (Hashes every submission)

Whenever possible, add data rather than delete or modify it.

Branching is fast and smooth.

Full compatibility with Linux commands.

Download and install Git

You can download the latest version of git from the Git website, and it is sufficient to use it only in GitBash.

The following pictures need to be noted, other direct installation defaults can be downloaded.

Local structure of Git

Git has three zones locally:

workspace (where code is written)

Staging area (temporary storage)

Local library (for historical versions)

After creating a file in the workspace, you can add it to the staging area using git add, and then add it to the local repository using git commit.

Git and code hosting centers

GitHub is Git's code hosting hub whose job is to maintain remote repositories.

In a local area network environment, you can set up a GitLab server as a code hosting center.

In an extranet environment, you can have GitHub and the code cloud as code hosting centers.

How local cards interact with remote libraries

Intra-team collaboration:

Cross-Team Collaboration:

Thank you for reading! About "Git how to download and install" this article is shared here, I hope the above content can have some help for everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report