- vừa được xem lúc

Chapter 2: Installing and Configuring Git

0 0 13

Người đăng: Duc Nguyen

Theo Viblo Asia

This chapter belong to Getting Started with Git: A Beginner's Guide Series

In this chapter, we will focus on installing Git on your computer and setting it up for use. Before diving into Git commands and usage, you must have Git installed and properly configured on your computer. Git is available for Windows, Mac, and Linux operating systems and can be easily installed using the installation packages provided by the Git official website.

Installing

  • Installing Git on Windows

    To install Git on Windows, you need to follow these steps:

    1. Download the latest Git version from the official Git website
    2. Double-click the downloaded file and run the installer.
    3. Follow the on-screen instructions to complete the installation.
  • Installing Git on Mac

    To install Git on Mac, you need to follow these steps:

    1. Download the latest Git version from the official Git website.
    2. Double-click the downloaded file and run the installer.
    3. Follow the on-screen instructions to complete the installation.
    4. Installing Git on Linux
  • To install Git on Linux, you need to follow these steps:

    1. Open the terminal window and run the following command:

      sudo apt-get install git-all

    2. The system will prompt you for your password. Enter your password, and the Git installation process will begin.

    3. Once the installation is complete, you can run the Git version command to check if the installation was successful.

Configuring

Once you have installed Git on your computer, the next step is to configure it. You need to configure Git with your username and email address, as it will be used to identify the author of the changes made to the repository.

To configure Git, you need to run the following command in the terminal window:

git config --global user.name "Your Name"
git config --global user.email "Your Email Address"

With these simple steps, you have installed and configured Git on your computer. In the next chapter, we will dive into the Git commands and usage. Before you start working with Git, it's important to understand the basics of version control and the Git terminology.

Bình luận

Bài viết tương tự

- vừa được xem lúc

Đặt tên commit message sao cho "tình nghĩa anh em chắc chắn bền lâu"????

. Lời mở đầu. .

1 1 701

- vừa được xem lúc

Tập hợp những câu lệnh GIT hữu dụng

Dưới đây là một vài ví dụ về các câu lệnh Git mà tôi thường dùng. git config --global user.name "John Doe". git config --global user.

0 0 55

- vừa được xem lúc

Cấu hình CI/CD với Github (phần 2): Trigger một work flow

Events trigger. Bạn có thể cấu hình cho workflows chạy khi có một sự kiện nào đó xảy ra trên GitHub, theo một lịch có sẵn hoặc cũng có thể là một sự kiện nào đó xảy ra ngoài GitHub.

0 0 70

- vừa được xem lúc

Cấu hình CI/CD với Github (phần 1): Một ít lý thuyết

CI/CD là gì. Về mặt khái niệm là vậy nhưng về mặt triển khai thì CI/CD là quá trình tự động thực hiện các quá trình build, test, release, deploy khi có các trigger như commit/merge code lên một branch định sẵn hoặc có thể là tự động chạy theo một lịch cố định.

0 0 118

- vừa được xem lúc

Giới thiệu về Git LFS

. Git LFS là gì . Git LFS làm điều này bằng cách thay thế các tệp lớn trong repo của bạn bằng một con trỏ nhỏ.

0 0 29

- vừa được xem lúc

Git workflow được Google và Facebook sử dụng có gì hay ho

Với developer thì Git hẳn là công cụ rất quen thuộc và không thể thiếu rồi. Thế nhưng có mấy ai thực sự hiểu được Git.

0 0 66