Install Git
Install Git on Windows
- Go to git-scm.com/install/windows and download the latest version
- Run the installer
- Under Select Components, enable Add a Git Bash Profile to Windows Terminal
- Set the default editor to your preference (Notepad or VSCode recommended)
- Set the default branch name to main
- Complete the installation using the remaining defaults
Configure Git
- Open Git Bash (search for it in the Start menu)
- Set your name:
git config --global user.name "Your Name" - Set your email:
git config --global user.email "your.email@example.com" - Set the default branch to main:
git config --global init.defaultBranch main - Enable auto-creation of remote branches:
git config --global push.autoSetupRemote true - Verify your configuration:
git config --list
With this setup complete, you are ready to integrate Git with your IDE (e.g. RStudio) and create a new git repository.