If you use two-factor authentication see Create a Personal Access Token to use it as password in the command line tools at Switching to 2-factor authentication in GitHub
- Navigate to https://git-scm.com/download/win to download Git for Windows. The page automatically downloads the installer for the operating system you use.
- Install the application
- Accept the default values, including these:
- Make sure the File Explorer integration for Git Bash is checked.

- Enable the Git tools in the command prompt too

- HTTPS transport backend. For large corporations with internal root certificates and Windows Active Directory, the second option may be a better choice,

- Line endings for Windows computers

- Terminal emulator

- Use Fast Forward or Merge

- Use the Git credential manager

- Caching

- Finish the installation.

Configure Git for Windows
Enable Page Up and Page Down
- In File Explorer right-click any folder and select Show more options

- Select Open Git Bash here,

- Stretch the Bash window to the full width of the page to have more room to work later,
- Right-click the Bash window and select Options…,

- On the Window tab,
- Click the Current size button to save the size,
- Select PgUp and PgDn scroll without modifier to be able to scroll quickly up and down in the window with the Page up and Page down buttons.

- Click the Save button
Set up Git Bash to always run as Administrator
Certain commands need elevated rights to run, so we will set up the Bash window to run as administrator.
- Type bash into the search field

- Right-click the found link and select Open file location

- Right-click the menu shortcut and select Properties

- On the Compatibility tab select Run this program as administrator

Dubious ownership warning
If you already created a Git repository on your computer as the default user, and you have to use a different Admin account to run the terminal in admin mode you will get the error message when you try to execute any Git command in that repository:
$ git status
fatal: detected dubious ownership in repository at ‘C:/Users/…’
‘C:/Users/…’ is owned by:
…
but the current user is:
…
To add an exception for this directory, call:
git config --global --add safe.directory C:/Users/...
Execute the recommended command to enable multiple user accounts to manage the same repository.
Using the Bash window
- When you will start the Git Bash window you will always get the confirmation popup. You may need to enter your admin credentials if your default user does not have admin rights.
You can start the Git Bash window from the File Explorer
- In File Explorer right-click any folder and select Show more options

- Select Open Git Bash here,

Configure the Git command line tool
To configure Git see Git configuration.