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

The method of installing Git in Linux and Windows

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

Share

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

This article mainly introduces "Linux and Windows installation Git method", in the daily operation, I believe many people in Linux and Windows installation Git method problems have doubts, Xiaobian consulted all kinds of information, sorted out simple and easy to use operation methods, I hope to answer "Linux and Windows installation Git method" doubts helpful! Next, please follow the small series to learn together!

Install on Linux

If you want to install git on linux as a binary installer, you can do so using the basic package management tools included with your distribution.

If you take fedora as an example, you can use yum:

$ sudo yum install git

If you are on a debian-based distribution, try apt-get:

$ sudo apt-get install git

installed on Windows

There are several ways to install git on windows. The official version can be downloaded from the official git website. Open http://git-scm.com/download/win and the download will start automatically. Note that this is a project called git for windows (also known as msysgit), and git are separate projects.

Another easy way is to install github for windows. The installer includes graphical and command-line versions of git. It also supports powershell, provides stable credential caching and robust crlf settings. We'll learn more about that later, but for now, just a word is enough. That's all you need.

Install from source code

Some people think it's more practical to install git from source because you get the latest version. Binary installers tend to have some lag, although git has matured in recent years and this difference is no longer significant.

If you want to install git from source, you'll need to install the libraries git depends on: curl, zlib, openssl, expat, and libiconv. If you have yum (e.g. fedora) or apt-get (e.g. debian-based systems) on your system, you can compile and install the binary version of git using one of the following commands:

$ sudo yum install curl-devel expat-devel gettext-devel \ openssl-devel zlib-devel $ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \ libz-dev libssl-dev

In order to be able to add documents in more formats (doc, html, info), you need to install the following dependencies:

$ sudo yum install asciidoc xmlto docbook2x$ sudo apt-get install asciidoc xmlto docbook2x

Once you have installed all the necessary dependencies, you can go ahead and get the latest release tarball from several places. Usually it's the latest version on github, but kernel.org contains a file download signature that you'll need if you want to verify the download is correct.

Then compile and install:

$ tar -zxf git-2.0.0.tar.gz $ cd git-2.0.0 $ make configure $ ./ configure --prefix=/usr $ make all doc info $ sudo make install install-doc install-html install-info

Once done, you can use git to get git upgrades:

$ git clone git://git.kernel.org/pub/scm/git/git.git At this point, the study of "How to install Git on Linux and Windows" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

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