Skip to main content
GitHub Docs
  • All products
  • Get started
    • Quickstart
      • Hello World
      • Set up Git
      • Create a repo
      • Fork a repo
      • GitHub flow
      • Contributing to projects
      • Be social
      • Communicating on GitHub
      • GitHub glossary
      • Git cheatsheet
      • Learning resources
    • Onboarding
      • Getting started with your GitHub account
      • Getting started with GitHub Team
      • Getting started with GitHub Enterprise Cloud
    • Learning about GitHub
      • GitHub’s products
      • Docs versions
      • GitHub language support
      • Types of GitHub accounts
      • Access permissions
      • GitHub Advanced Security
      • Changes to GitHub plans
    • Signing up for GitHub
      • Sign up for a new GitHub account
      • Verify your email address
      • Enterprise Cloud trial
      • Enterprise Server trial
    • Using GitHub
      • Feature preview
      • Supported browsers
      • GitHub CLI
      • GitHub Desktop
      • GitHub Mobile
      • Keyboard shortcuts
      • GitHub Command Palette
      • Connectivity problems
    • Writing on GitHub
      • Start writing on GitHub
        • Write & format on GitHub
        • Basic formatting syntax
      • Work with advanced formatting
        • Organized data with tables
        • Collapsed sections
        • Create code blocks
        • Create diagrams
        • Mathematical expressions
        • Auto linked references
        • Attaching files
        • Permanent links to code
        • Using keywords in issues and pull requests
      • Work with saved replies
        • About saved replies
        • Creating a saved reply
        • Editing a saved reply
        • Deleting a saved reply
        • Using saved replies
      • Share content with gists
        • Creating gists
        • Forking and cloning gists
    • Importing your projects
      • Import code to GitHub
        • About GitHub Importer
        • Use GitHub Importer
        • Update author GitHub Importer
        • Import repo locally
        • Add locally hosted code
        • Code migration tools
      • Work with Subversion on GitHub
        • Subversion & Git differences
        • Support for Subversion clients
        • Properties supported by GitHub
    • Explore projects
      • Contribute to open source
      • Save repos with stars
      • Following people
      • Following organizations
    • Getting started with Git
      • Set your username
      • Caching credentials
      • Git passwords
      • macOS Keychain credentials
      • Git workflows
      • About remote repositories
      • Manage remote repositories
      • Associate text editors
      • Handle line endings
      • Ignoring files
    • Using Git
      • About Git
      • Push commits to a remote
      • Get changes from a remote
      • Non-fast-forward error
      • Splitting a subfolder
      • About Git subtree merges
      • About Git rebase
      • Git rebase
      • Resolve conflicts after rebase
      • Special characters in names
    • Customize your workflow
      • Exploring integrations
        • About integrations
        • About webhooks
        • About GitHub Marketplace
        • Extensions & integrations
      • Install Marketplace apps
        • Install app personal account
        • Install app organization
    • Privacy on GitHub
      • GitHub's use of your data
      • Request account archive
      • Manage data use for private repo
      • GitHub Archive program
  • Get started/
  • Quickstart/
  • Set up Git
 
GitHub Docs
  • Get started/
  • Quickstart/
  • Set up Git
Get started
    • Get started
    • Account and profile
    • Authentication
    • Repositories
    • Enterprise administrators
    • Billing and payments
    • Site policy
    • Organizations
    • Code security
    • Pull requests
    • GitHub Issues
    • GitHub Actions
    • GitHub Copilot
    • GitHub Codespaces
    • GitHub Packages
    • Search on GitHub
    • Developers
    • REST API
    • GraphQL API
    • GitHub CLI
    • GitHub Discussions
    • GitHub Sponsors
    • Building communities
    • GitHub Pages
    • Education
    • GitHub Desktop
    • GitHub Support
    • Atom
    • Electron
    • CodeQL
    • npm
Free, Pro, & Team
    • Free, Pro, & Team
    • Enterprise Cloud
    • Enterprise Server 3.6
    • Enterprise Server 3.5
    • Enterprise Server 3.4
    • Enterprise Server 3.3
    • Enterprise Server 3.2
    • GitHub AE
    • All Enterprise Server releases
    • About versions

 

Set up Git

In this article

  • Using Git
  • Setting up Git
  • Authenticating with GitHub from Git
  • Next steps

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

Using Git

To use Git on the command line, you will need to download, install, and configure Git on your computer. You can also install GitHub CLI to use GitHub from the command line. For more information, see "About GitHub CLI."

If you want to work with Git locally, but do not want to use the command line, you can instead download and install the GitHub Desktop client. For more information, see "Installing and configuring GitHub Desktop."

If you do not need to work with files locally, GitHub lets you complete many Git-related actions directly in the browser, including:

  • Creating a repository
  • Forking a repository
  • Managing files
  • Being social

Setting up Git

  1. Download and install the latest version of Git.

Note: If you are using a Chrome OS device, additional set up is required:

  1. Install a terminal emulator such as Termux from the Google Play Store on your Chrome OS device.
  2. From the terminal emulator that you installed, install Git. For example, in Termux, enter apt install git and then type y when prompted.
  1. Set your username in Git.
  2. Set your commit email address in Git.

Authenticating with GitHub from Git

When you connect to a GitHub repository from Git, you will need to authenticate with GitHub using either HTTPS or SSH.

Note: You can authenticate to GitHub using GitHub CLI, for either HTTP or SSH. For more information, see gh auth login.

Connecting over HTTPS (recommended)

If you clone with HTTPS, you can cache your GitHub credentials in Git using a credential helper. For more information, see "Cloning with HTTPS urls" and "Caching your GitHub credentials in Git."

Connecting over SSH

If you clone with SSH, you must generate SSH keys on each computer you use to push or pull from GitHub. For more information, see "Cloning with SSH urls" and "Generating a new SSH key."

Next steps

You now have Git and GitHub all set up. You may now choose to create a repository where you can put your projects. Saving your code in a repository allows you to back up your code and share it around the world.

  • Creating a repository for your project allows you to store code in GitHub. This provides a backup of your work that you can choose to share with other developers. For more information, see “Create a repository.".

  • Forking a repository will allow you to make changes to another repository without affecting the original. For more information, see "Fork a repository."

  • Each repository on GitHub is owned by a person or an organization. You can interact with the people, repositories, and organizations by connecting and following them on GitHub. For more information, see "Be social."

  • GitHub has a great support community where you can ask for help and talk to people from around the world. Join the conversation on GitHub Community.

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.

Still need help?

Ask the GitHub community
Contact support
  • © 2022 GitHub, Inc.
  • Terms
  • Privacy
  • Security
  • Status
  • Help
  • Contact GitHub
  • Pricing
  • Developer API
  • Training
  • Blog
  • About