Skip to main content

Git basics

Set up Git, a distributed version control system, to manage your repositories from your computer.

Set up Git

At the heart of is an open-source version control system (VCS) called Git. Git is responsible for everything -related that happens locally on your computer.

Setting your username in Git

Git uses a username to associate commits with an identity. The Git username is not the same as your username.

Caching your credentials in Git

If you're cloning repositories using HTTPS, we recommend you use CLI or Git Credential Manager (GCM) to remember your credentials.

Why is Git always asking for my password?

If Git prompts you for a username and password every time you try to interact with , you're probably using the HTTPS clone URL for your repository.

Updating credentials from the macOS Keychain

You'll need to update your saved credentials in the git-credential-osxkeychain helper if you change your username, password, or personal access token on .

Git workflows

flow is a lightweight, branch-based workflow that supports teams and projects that deploy regularly.

About remote repositories

's collaborative approach to development depends on publishing commits from your local repository to for other people to view, fetch, and update.

Managing remote repositories

Learn to work with your local repositories on your computer and remote repositories hosted on .

Associating text editors with Git

Use a text editor to open and edit your files with Git.

Configuring Git to handle line endings

To avoid problems in your diffs, you can configure Git to properly handle line endings.

Ignoring files

You can configure Git to ignore files you don't want to check in to .

Git cheatsheet

This Git cheat sheet is a time saver when you forget a command or don't want to use help in the CLI.