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

Git installation steps _ Power Node Java College arrangement

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Git was originally developed on Linux, and for a long time, Git could only run on Linux and Unix systems. Slowly, however, someone transplanted it to Windows. Git now works on Linux, Unix, Mac, and Windows platforms.

To use Git, the first step is, of course, to install Git. Read the following text based on the platform you currently use:

Install Git on Linux

First, you can try typing git to see if Git is installed on the system:

$gitThe program 'git' is currently not installed. You can install it by typing:sudo apt-get install git

Like the command above, a lot of Linux will kindly tell you that Git is not installed and will tell you how to install Git.

If you happen to use Debian or Ubuntu Linux, you can install Git directly through a sudo apt-get install git, which is very simple.

The older Debian or Ubuntu Linux needs to change the command to sudo apt-get install git-core, because there used to be a software called GIT (GNU Interactive Tools), so Git can only be called git-core. Because Git is really too famous, it was later changed from GNU Interactive Tools to gnuit,git-core to git.

If it is another version of Linux, you can install it directly from the source code. First download the source code from the Git official website, then decompress it, and enter:. / config,make,sudo make install in turn

Just install these commands.

Install Git on Mac OS X

If you are using Mac for development, there are two ways to install Git.

One is to install homebrew, and then install Git through homebrew. For specific methods, please refer to the documentation of homebrew: http://brew.sh/.

The second method is simpler and the recommended method is to install Xcode,Xcode integrated Git directly from AppStore, but there is no installation by default. You need to run Xcode, select "Xcode"-> "Preferences", find "Downloads" in the pop-up window, select "Command Line Tools", and click "Install" to complete the installation.

Xcode is the Apple official IDE, very powerful, is a must for the development of Mac and iOS App equipment, and is free!

Install Git on Windows

To be honest, Windows is the worst development platform, and Windows is generally not recommended if you are not developing Windows games or debugging pages in IE. However, now that Microsoft has fallen into the trap of Microsoft, there is a way to install Git.

When you want to use a lot of Linux/Unix tools under Windows, you need a simulation environment like Cygwin, and so does Git. The installation and configuration of Cygwin are complex, so it is not recommended that you toss around. However, some experts have packaged the simulation environment and Git, called msysgit, only need to download a separate exe installer, and nothing else, which is absolutely easy to use.

Msysgit is the Windows version of Git. Download it from https://git-for-windows.github.io and install it by default.

After the installation is complete, find "Git"-> "Git Bash" in the start menu, and pop up something similar to a command line window, which means that Git has been installed successfully!

After the installation is complete, you need to set up the last step, enter:

$git config-global user.name "Your Name" $git config-global user.email email@example.com

Because Git is a distributed version control system, every machine must report itself: your name and Email address. You may be worried, what if someone deliberately pretends to be someone else? There is no need to worry about this. first of all, we believe that we are all kind-hearted and ignorant masses, and secondly, there are ways to find out if there is really impersonation.

Note the-global parameter of the git config command, which means that all Git repositories on your machine will use this configuration. Of course, you can also specify a different user name and Email address for a warehouse.

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support 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

Servers

Wechat

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

12
Report