diff --git a/docs.json b/docs.json index 2f8762811..4f5d768fa 100644 --- a/docs.json +++ b/docs.json @@ -24,6 +24,7 @@ "index", "quickstart", "installation", + "git", { "group": "Web editor", "icon": "mouse-pointer-2", diff --git a/git.mdx b/git.mdx new file mode 100644 index 000000000..e423a6188 --- /dev/null +++ b/git.mdx @@ -0,0 +1,120 @@ +--- +title: Git +description: Learn how to install Git on your system to get started with version control +--- + +Git is a distributed version control system that tracks changes in your files and enables collaboration with others. You'll need Git installed to work with most development projects. + +## Prerequisites + +Before installing Git, ensure you have administrative privileges on your system. + +## Installation by operating system + + + + ### Option 1: Download from Git website + + 1. Visit [git-scm.com](https://git-scm.com/download/win) + 2. Download the latest version for Windows + 3. Run the installer and follow the setup wizard + 4. Accept the default settings unless you have specific requirements + + ### Option 2: Using package managers + + **Using Chocolatey:** + ```bash + choco install git + ``` + + **Using Winget:** + ```bash + winget install --id Git.Git -e --source winget + ``` + + ### Verify installation + ```bash + git --version + ``` + + + + ### Option 1: Using Homebrew (recommended) + + If you have Homebrew installed: + ```bash + brew install git + ``` + + ### Option 2: Download from Git website + + 1. Visit [git-scm.com](https://git-scm.com/download/mac) + 2. Download the latest version for macOS + 3. Open the downloaded `.dmg` file and follow the installation instructions + + ### Option 3: Using Xcode Command Line Tools + + Git comes bundled with Xcode Command Line Tools: + ```bash + xcode-select --install + ``` + + ### Verify installation + ```bash + git --version + ``` + + + + ### Ubuntu/Debian + ```bash + sudo apt update + sudo apt install git + ``` + + ### CentOS/RHEL/Fedora + **For CentOS/RHEL:** + ```bash + sudo yum install git + ``` + + **For Fedora:** + ```bash + sudo dnf install git + ``` + + ### Arch Linux + ```bash + sudo pacman -S git + ``` + + ### Verify installation + ```bash + git --version + ``` + + + +## Initial configuration + +After installing Git, configure your identity: + +```bash +git config --global user.name "Your Name" +git config --global user.email "your.email@example.com" +``` + +You can verify your configuration: +```bash +git config --list +``` + +## Next steps + +With Git installed, you can now: +- Clone repositories from GitHub, GitLab, or other Git hosting services +- Initialize new Git repositories with `git init` +- Start tracking changes in your projects +- Collaborate with others using version control + +For more advanced Git usage and concepts, check out the [Git documentation](https://git-scm.com/doc). \ No newline at end of file