~/
hackweb.dev
Installing and Setting Up Git
Quiz
⌘K
...
~/
/tutorials
/git/git-install-setup/edit
~ Contribute
Suggest a correction or improvement. The author reviews it before it goes live.
Loading...
Comment
0 / 300
Typo
Grammar
Broken link
Clarify
Code
en/tutorials/git/2git-install-setup
Write
Preview
Diff
# Installing and Setting Up Git Git runs on Windows, macOS, and Linux. After installation, you'll configure your identity so Git knows who's making changes. ## Installation ### Windows Download from [git-scm.com](https://git-scm.com) and run the installer. ### macOS ```bash brew install git ``` Or install Xcode Command Line Tools. ### Linux ```bash sudo apt install git # Debian/Ubuntu sudo dnf install git # Fedora ``` ## Configuring Your Identity Set your name and email so commits are attributed to you: ```bash git config --global user.name "Your Name" git config --global user.email "you@example.com" ``` ## Setting Default Editor Choose your preferred editor for commit messages: ```bash git config --global core.editor "code --wait" # VS Code git config --global core.editor "vim" # Vim git config --global core.editor "nano" # Nano ``` ## Viewing Configuration Check all your settings: ```bash git config --list ``` ## Best Practices - Use your real name and email for professional projects - Set your editor to something you're comfortable with - Use `--global` for system-wide settings - Use `--local` for project-specific settings ## Common Mistakes - Forgetting to set your name and email - Using a fake email that doesn't match your accounts - Not setting an editor (Git will use a default you might not know) - Installing Git without adding it to PATH
No changes yet
Reset to original
Submit suggestion
cancel