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

What is the method of installing git in linux

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "what is the method of installing git in linux", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "linux installation of git method is what" article.

1. Introduction

Git is a free, open source distributed version control system for agile and efficient handling of any project, small or large.

Git is an open source distributed version control system for efficient and high-speed version management of projects ranging from very small to very large.

Git is an open source version control software developed by linus torvalds to help manage linux kernel development.

Installation environment

Aliyun ecs centos 7.4 64 bit

2. Use shell to install git

Please save the downloaded shell to the same directory as the following code

Cnl_function.sh

#! / bin/bashsource. / cnl_function.sh#function of installing gitinstall_git () {# download the compressed package cd / usr/local/src # if compressed package is empty then download [- f git-2.2.1.tar.gz] | | wget https://www.kernel.org/pub/software/scm/git/git-2.2.1.tar.gz check_ok tar-zxf git-2.2.1.tar.gz check_ok [- d / usr / local/git] & & mv / usr/local/git / usr/local/git_ `date +% s`date $p done make prefix=/usr/local/git all make prefix=/usr/local/git install check_ok if! Grep'^ git:' / etc/group then groupadd git fi if! Grep'^ git:' / etc/passwd then useradd-m git-s / usr/local/git/bin/git-shell-g git fi check_ok ln-s / usr/local/git/bin/git / usr/local/bin/git echo "git is installed finish."} read-p "enter (y) to start installation git:" nif [$n = ='y'] then echo "start installation= >" install_gitelse echo "cancel the installation." fi

As shown in the following figure, I will save the bit cnl_install_git.sh in the above code

Execute the script and follow the prompts to enter

Command line execution

Git-version

The installation is complete.

The above is about the content of this article "what is the method of installing git in linux?" I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.

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