How to install git on windows 10

How to install git on windows 10

Установка и настройка Git

Git еще не является параметром по умолчанию на компьютерах, поэтому его необходимо установить и настроить вручную. И, как и другое программное обеспечение, важно поддерживать Git в актуальном состоянии. Обновления защититься от уязвимостей системы безопасности, исправить ошибки и предоставить доступ к новым функциям.

В следующих разделах описывается установка и обслуживание Git для трех основных платформ.

Установка Git для Windows

Загрузите и установите Git для Windows. После установки Git доступен из командной строки или PowerShell. Рекомендуется выбрать значения по умолчанию во время установки, если не есть веские основания для их изменения.

Git для Windows не обновляется автоматически. Чтобы обновить Git для Windows, скачайте новую версию установщика, которая обновляет Git для Windows и сохраняет все параметры.

Установка Git для macOS

macOS 10.9 (Mavericks) и более поздних версий устанавливает Git при первой попытке запустить его из терминала. Хотя этот метод является простым способом получения Git в системе, он не позволяет контролировать частоту применения обновлений или исправлений безопасности.

Вместо этого рекомендуется установить Git через Homebrew и использовать средства Homebrew для поддержания актуальности Git. Homebrew — отличный способ установки средств разработки открытый код и управления ими на компьютере Mac из командной строки.

Установите Homebrew и выполните следующую команду, чтобы установить последнюю версию Git на компьютере Mac:

> brew install git

Чтобы обновить установку Git, используйте параметр обновления Homebrew:

> brew upgrade git

Графический установщик для Git в macOS также доступен на официальном веб-сайте Git.

Установка Git для Linux

Используйте собственную систему управления пакетами дистрибутива Linux для установки и обновления Git. Например, в Ubuntu:

> sudo apt-get install git

Настройка Git в Linux

Настройте имя и адрес электронной почты перед началом работы с Git. Git присоединяет эти сведения к изменениям и позволяет другим пользователям определить, какие изменения принадлежат к каким авторам.

Выполните следующие команды из командной строки после установки Git, чтобы настроить эти сведения:

Visual Studio предлагает отличный встроенный интерфейс Git без дополнительных инструментов. Дополнительные сведения см. в этом руководстве по Visual Studio Git.

Install and set up Git

Git isn’t yet a default option on computers, so it must be manually installed and configured. And like other software, it’s important to keep Git up to date. Updates protect from security vulnerabilities, fix bugs, and provide access to new features.

The following sections describe how to install and maintain Git for the three major platforms.

Install Git for Windows

Download and install Git for Windows. Once installed, Git is available from the command prompt or PowerShell. It’s recommended that you select the defaults during installation unless there’s good reason to change them.

Git for Windows doesn’t automatically update. To update Git for Windows, download the new version of the installer, which updates Git for Windows in place and retains all settings.

Install Git for macOS

macOS 10.9 (Mavericks) and higher installs Git the first time you attempt to run it from the Terminal. While this method is an easy way to get Git on a system, it doesn’t allow for control over how often updates or security fixes are applied.

Instead, it’s recommended that you install Git through Homebrew and that you use Homebrew tools to keep Git up to date. Homebrew is a great way to install and manage open source development tools on a Mac from the command line.

Install Homebrew and run the following to install the latest version of Git on a Mac:

> brew install git

To update the Git install, use Homebrew’s upgrade option:

> brew upgrade git

A graphical installer for Git on macOS is also available from the official Git website.

Install Git for Linux

Use the Linux distribution’s native package management system to install and update Git. For example, on Ubuntu:

> sudo apt-get install git

Configure Git on Linux

Set up the name and email address before starting to work with Git. Git attaches this information to changes and lets others identify which changes belong to which authors.

Run the following commands from the command prompt after installing Git to configure this information:

Visual Studio offers a great out-of-the-box Git experienceВ without any extra tooling. Learn more in this Visual Studio Git tutorial.

Install Git

Install Git on Mac OS X

Apple actually maintain and ship their own fork of Git, but it tends to lag behind mainstream Git by several major versions. You may want to install a newer version of Git using one of the methods below:

Git for Mac Installer

The easiest way to install Git on a Mac is via the stand-alone installer:

Follow the prompts to install Git.

Configure your Git username and email using the following commands, replacing Emma’s name with your own. These details will be associated with any commits that you create:

(Optional) To make Git remember your username and password when working with HTTPS repositories, configure the git-credential-osxkeychain helper.

Install Git with Homebrew

If you have installed Homebrew to manage packages on OS X, you can follow these instructions to install Git:

Open your terminal and install Git using Homebrew:

Configure your Git username and email using the following commands, replacing Emma’s name with your own. These details will be associated with any commits that you create:

(Optional) To make Git remember your username and password when working with HTTPS repositories, install the git-credential-osxkeychain helper.

Install Git with MacPorts

If you have installed MacPorts to manage packages on OS X, you can follow these instructions to install Git:

Open your terminal and update MacPorts:

Search for the latest available Git ports and variants:

Install Git with bash completion, the OS X keychain helper, and the docs:

Configure your Git username and email using the following commands, replacing Emma’s name with your own. These details will be associated with any commits that you create:

(Optional) To make Git remember your username and password when working with HTTPS repositories, configure the git-credential-osxkeychain helper.

Install the git-credential-osxkeychain helper

Bitbucket supports pushing and pulling your Git repositories over both SSH and HTTPS. To work with a private repository over HTTPS, you must supply a username and password each time you push or pull. The git-credential-osxkeychain helper allows you to cache your username and password in the OSX keychain, so you don’t have to retype it each time.

If you followed the MacPorts or Homebrew instructions above, the helper should already be installed. Otherwise you’ll need to download and install it. Open a terminal window and check:

If you receive a usage statement, skip to step 4. If the helper is not installed, go to step 2.

Use curl to download git-credential-osxkeychain (or download it via your browser) and move it to /usr/local/bin :

Make the file an executable:

Configure git to use the osxkeychain credential helper.

The next time Git prompts you for a username and password, it will cache them in your keychain for future use.

Install Git with Atlassian Sourcetree

Sourcetree, a free visual Git client for Mac, comes with its own bundled version of Git. You can download Sourcetree here.

To learn how to use Git with Sourcetree (and how to host your Git repositories on Bitbucket) you can follow our comprehensive Git tutorial with Bitbucket and Sourcetree.

Build Git from source on OS X

Building Git can be a little tricky on Mac due to certain libraries moving around between OS X releases. On El Capitan (OS X 10.11), follow these instructions to build Git:

From your terminal install XCode’s Command Line Tools (if you haven’t already):

Using Homebrew, install openssl:

Clone the Git source (or if you don’t yet have a version of Git installed, download and extract it):

To build Git run make with the following flags:

Install Git on Windows

Git for Windows stand-alone installer

When you’ve successfully started the installer, you should see the Git Setup wizard screen. Follow the Next and Finish prompts to complete the installation. The default options are pretty sensible for most users.

Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt).

Run the following commands to configure your Git username and email using the following commands, replacing Emma’s name with your own. These details will be associated with any commits that you create:

Optional: Install the Git credential helper on Windows

Bitbucket supports pushing and pulling over HTTP to your remote Git repositories on Bitbucket. Every time you interact with the remote repository, you must supply a username/password combination. You can store these credentials, instead of supplying the combination every time, with the Git Credential Manager for Windows.

Install Git with Atlassian Sourcetree

Sourcetree, a free visual Git client for Windows, comes with its own bundled version of Git. You can download Sourcetree here.

To learn how to use Git with Sourcetree (and how to host your Git repositories on Bitbucket) you can follow our comprehensive Git tutorial with Bitbucket and Sourcetree.

Install Git on Linux

Debian / Ubuntu (apt-get)

Git packages are available via apt:

From your shell, install Git using apt-get:

Configure your Git username and email using the following commands, replacing Emma’s name with your own. These details will be associated with any commits that you create:

Fedora (dnf/yum)

Git packages are available via both yum and dnf:

From your shell, install Git using dnf (or yum, on older versions of Fedora):

Configure your Git username and email using the following commands, replacing Emma’s name with your own. These details will be associated with any commits that you create

Build Git from source on Linux

Git requires the several dependencies to build on Linux. These are available via apt:

From your shell, install the necessary dependencies using apt-get:

Clone the Git source (or if you don’t yet have a version of Git installed, download and extract it):

Git requires the several dependencies to build on Linux. These are available via both yum and dnf:

From your shell, install the necessary build dependencies using dnf (or yum, on older versions of Fedora):

or using yum. For yum, you may need to install the Extra Packages for Enterprise Linux (EPEL) repository first:

Symlink docbook2X to the filename that the Git build expects:

Clone the Git source (or if you don’t yet have a version of Git installed, download and extract it):

Git Installation on Windows: How to Install Git on Windows (Step-by-Step) Guide

Last updated on Aug 13, 2022 478082

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Git Tutorial

GIT Tutorial For Beginner

What is Git: Features, Command and Workflow in Git

Git Installation on Windows: A (Step-by-Step) Guide

All The Git Commands You Need to Know About

Git Push Command Explained With Demo

Git Pull Request Basics Explained with Demo

How to Resolve Merge Conflicts in Git?

What is GitHub And How To Use It?

Git vs GitHub: What are the Major Differences?

What is GitLab and How To use It?

Top 40 Git Interview Questions and Answers

Table of Contents

Git is a DevOps tool for source code management—an open-source version control system (VCS) used to handle small to very large projects efficiently. Git is used to tracking changes in the source code, supporting non-linear development so that multiple developers can work together in near real-time.

In this Git Installation on Windows article, you will find a step-wise guide to Git installation on Windows 10. Let’s get started.

Post Graduate Program in DevOps

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Git Installation on Windows

Let us now look at the various steps in the Git installation on Windows.

Step 1:

Download the latest version of Git and choose the 64/32 bit version. After the file is downloaded, install it in the system. Once installed, select Launch the Git Bash, then click on finish. The Git Bash is now launched.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Step 2:

Check the Git version:

Step 3:

For any help, use the following command:

$ git help config

This command will lead you to a browser of config commands. Basically, the helpВ the command provides a manual from the help page for the command just following it (here, it’s config).

Another way to use the same command is as follows:

Step 4:

Create a local directory using the following command:

Step 5:

The next step is to initialize the directory:

Step 6:

Go to the folder where «test» is created and create a text document named «demo.» Open «demo» and put any content, like «Hello Simplilearn.» Save and close the file.

Step 7:

Enter the Git bash interface and type in the following command to check the status:

Step 8:

Add the «demo» to the current directory using the following command:

$ git add demo.txt

Free Course: Introduction to DevOps Tools

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Step 9:

Next, make a commit using the following command:

Step 10:

Link the Git to a Github Account:

Note: simplilearn-github is the username on the Github account.

Step 11:

Open your Github account and create a new repository with the name «test_demo» and click on «Create repository.» This is the remote repository. Next, copy the link of «test_demo.»

Step 12:

Go back to Git bash and link the remote and local repository using the following command:

$ git remote add origin

Step 13:

Push the local file onto the remote repository using the following command:

$ git push origin master

Step 14:

Move back to Github and click on «test_demo» and check if the local file «demo.txt» is pushed to this repository.

DevOps Engineer Master’s Program

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Summary: Steps For Git Installation on Windows 10

Bridge the gap between software developers and operations and develop your career in DevOps by choosing our unique Post Graduate Program in DevOps. Enroll for the PGP in collaboration with Caltech CTME Today!

Become a DevOps Expert

Are you preparing for a career in DevOps? Check out Simplilearn’s DevOps Engineer Master’s Program or the DevOps Certification Training Course that bridges the gap between software developers and operations. You can become an expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration, and IT service agility, using modern DevOps tools such as Git, Docker, Jenkins, Puppet, and Nagios. DevOps jobs are highly paid and in great demand, so start on your path today.

Find our DevOps Engineer Online Bootcamp in top cities:

NameDatePlace
DevOps EngineerClass starts on 27th Aug 2022,
Weekend batch
Your CityView Details
DevOps EngineerClass starts on 3rd Sep 2022,
Weekend batch
Your CityView Details
DevOps EngineerClass starts on 10th Sep 2022,
Weekend batch
Your CityView Details

About the Author

Haifa Perveez is passionate about learning new technologies and working on them. She is an engineer who loves to travel, read and write. She’s always curious about things and very determined to track the latest technologies and the trends that they are creating for the future.

How to Install and Use Git on Windows

Home » SysAdmin » How to Install and Use Git on Windows

Git is a widely used open-source software tracking application used to track projects across different teams and revision levels.

This guide will show you how to install Git on Windows.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Steps For Installing Git for Windows

Installing Git prompts you to select a text editor. If you don’t have one, we strongly advise you to install prior to installing Git. Our roundup of the best text editors for coding may help you decide.

Note: If you are new to Git, refer to our post How Does Git Work to learn more about Git workflow and Git functions.

Download Git for Windows

1. Browse to the official Git website: https://git-scm.com/downloads
2. Click the download link for Windows and allow the download to complete.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Extract and Launch Git Installer

3. Browse to the download location (or use the download shortcut in your browser). Double-click the file to extract and launch the installer.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

4. Allow the app to make changes to your device by clicking Yes on the User Account Control dialog that opens.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

5. Review the GNU General Public License, and when you’re ready to install, click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

6. The installer will ask you for an installation location. Leave the default, unless you have reason to change it, and click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

7. A component selection screen will appear. Leave the defaults unless you have a specific need to change them and click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

8. The installer will offer to create a start menu folder. Simply click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

9. Select a text editor you’d like to use with Git. Use the drop-down menu to select Notepad++ (or whichever text editor you prefer) and click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

10. The next step allows you to choose a different name for your initial branch. The default is ‘master.’ Unless you’re working in a team that requires a different name, leave the default option and click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

11. This installation step allows you to change the PATH environment. The PATH is the default set of directories included when you run a command from the command line. Leave this on the middle (recommended) selection and click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Server Certificates, Line Endings and Terminal Emulators

12. The installer now asks which SSH client you want Git to use. Git already comes with its own SSH client, so if you don’t need a specific one, leave the default option and click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

13. The next option relates to server certificates. Most users should use the default. If you’re working in an Active Directory environment, you may need to switch to Windows Store certificates. Click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

14. The next selection converts line endings. It is recommended that you leave the default selection. This relates to the way data is formatted and changing this option may cause problems. Click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

15. Choose the terminal emulator you want to use. The default MinTTY is recommended, for its features. Click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

16. The installer now asks what the git pull command should do. The default option is recommended unless you specifically need to change its behavior. Click Next to continue with the installation.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

17. Next you should choose which credential helper to use. Git uses credential helpers to fetch or save credentials. Leave the default option as it is the most stable one, and click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Additional Customization Options

18. The default options are recommended, however this step allows you to decide which extra option you would like to enable. If you use symbolic links, which are like shortcuts for the command line, tick the box. Click Next.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

19. Depending on the version of Git you’re installing, it may offer to install experimental features. At the time this article was written, the options to include support for pseudo controls and a built-in file system monitor were offered. Unless you are feeling adventurous, leave them unchecked and click Install.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Complete Git Installation Process

20. Once the installation is complete, tick the boxes to view the Release Notes or Launch Git Bash, then click Finish.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

How to Launch Git in Windows

Git has two modes of use – a bash scripting shell (or command line) and a graphical user interface (GUI).

Launch Git Bash Shell

To launch Git Bash open the Windows Start menu, type git bash and press Enter (or click the application icon).

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Launch Git GUI

To launch Git GUI open the Windows Start menu, type git gui and press Enter (or click the application icon).

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Connecting to a Remote Repository

You need a GitHub username and password for this next step.

Create a Test Directory

Open a Windows PowerShell interface by pressing Windows Key + x, and then i once the menu appears.

Create a new test directory (folder) by entering the following:

An example of the PowerShell output.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Change your location to the newly created directory:

Note: If you already have a GitHub repository, use the name of that project instead of git_test.

Configure GitHub Credentials

Configure your local Git installation to use your GitHub credentials by entering the following:

Note: Replace github_username and email_address with your GitHub credentials.

Clone a GitHub Repository

Go to your repository on GitHub. In the top right above the list of files, open the Clone or download drop-down menu. Copy the URL for cloning over HTTPS.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

Switch to your PowerShell window, and enter the following:

Important: In the example above, the command will clone the repository over HTTPS. Another option is cloning with SSH URLs. For that option to work, you must generate an SSH key pair on your Windows workstation and assign the public key to your GitHub account.

List Remote Repositories

Your working directory should now have a copy of the repository from GitHub. It should contain a directory with the name of the project. Change to the directory:

Note: Replace git_project with the actual name of the repository you downloaded. If it’s not working, you can list the contents of the current directory with the ls command. This is helpful if you don’t know the exact name or need to check your spelling.

Once you’re in the sub-directory, list the remote repositories:

Pushing Local Files to the Remote Repository

Once you’ve done some work on the project, you may want to submit those changes to the remote project on GitHub.

1. For example, create a new text file by entering the following into your PowerShell window:

2. Confirmation that the new file is created.

How to install git on windows 10. Смотреть фото How to install git on windows 10. Смотреть картинку How to install git on windows 10. Картинка про How to install git on windows 10. Фото How to install git on windows 10

3. Now check the status of your new Git branch and untracked files:

4. Add your new file to the local project:

5. Run git status again to make sure the text.txt file has been added. Next, commit the changes to the local project:

6. Finally, push the changes to the remote GitHub repository:

You may need to enter your username and password for GitHub.

Note: You can remove a remote repository if the need for it no longer exists. To learn how, visit our guide How to Remove a Git Remote.

You now have a working installation of Git on your Windows system. After installing Git on your Windows, you might find helpful how to update Git. Use Git’s features to coordinate work among programmers on a project.

For Linux and MacOS installation guides, check out our articles on installing Git on Ubuntu, CentOS and MacOS.

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *