HTTP/2 301
access-control-allow-origin: *
content-security-policy: default-src 'none';prefetch-src 'self';connect-src 'self';font-src 'self' data:;img-src 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com data: placehold.it;object-src 'self';script-src 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com 'self' data:;script-src-attr 'self';frame-src 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com https://support.github.com https://www.youtube-nocookie.com;frame-ancestors 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com;style-src 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com 'self' 'unsafe-inline' data:;child-src 'self';manifest-src 'self';upgrade-insecure-requests;base-uri 'self';form-action 'self'
cross-origin-opener-policy: same-origin
cross-origin-resource-policy: same-origin
origin-agent-cluster: ?1
referrer-policy: no-referrer-when-downgrade
x-content-type-options: nosniff
x-dns-prefetch-control: off
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-xss-protection: 0
cache-control: public, max-age=60
location: /en/get-started/git-basics
content-type: text/plain; charset=utf-8
x-github-backend: Kubernetes
x-github-request-id: 1F89:37F71B:8FCA0C:E227DC:687B7EAA
accept-ranges: bytes
age: 74980
date: Sun, 20 Jul 2025 08:06:39 GMT
via: 1.1 varnish
x-served-by: cache-bom4741-BOM
x-cache: HIT
x-cache-hits: 0
x-timer: S1752998800.802896,VS0,VE2
vary: Accept
strict-transport-security: max-age=31557600
content-length: 60
HTTP/2 200
access-control-allow-origin: *
content-security-policy: default-src 'none';prefetch-src 'self';connect-src 'self';font-src 'self' data:;img-src 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com data: placehold.it;object-src 'self';script-src 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com 'self' data:;script-src-attr 'self';frame-src 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com https://support.github.com https://www.youtube-nocookie.com;frame-ancestors 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com;style-src 'self' github.com *.github.com *.githubusercontent.com *.githubassets.com 'self' 'unsafe-inline' data:;child-src 'self';manifest-src 'self';upgrade-insecure-requests;base-uri 'self';form-action 'self'
cross-origin-opener-policy: same-origin
cross-origin-resource-policy: same-origin
origin-agent-cluster: ?1
referrer-policy: no-referrer-when-downgrade
x-content-type-options: nosniff
x-dns-prefetch-control: off
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
x-xss-protection: 0
cache-control: public, max-age=60
x-powered-by: Next.js
content-type: text/html; charset=utf-8
x-github-backend: Kubernetes
x-github-request-id: D4AD:17AFD8:9026CC:E28363:687B7EAC
content-encoding: gzip
accept-ranges: bytes
age: 74979
date: Sun, 20 Jul 2025 08:06:39 GMT
via: 1.1 varnish
x-served-by: cache-bom4741-BOM
x-cache: HIT
x-cache-hits: 0
x-timer: S1752998800.818551,VS0,VE1
vary: Accept-Encoding
strict-transport-security: max-age=31557600
content-length: 26832
Git basics - GitHub Docs Skip to main content Work with advanced formatting Archive account and public repos
Git basics Set up Git, a distributed version control system, to manage your GitHub repositories from your computer.
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.
Git uses a username to associate commits with an identity. The Git username is not the same as your GitHub username.
If Git prompts you for a username and password every time you try to interact with GitHub, you're probably using the HTTPS clone URL for your repository.
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 GitHub.
GitHub flow is a lightweight, branch-based workflow that supports teams and projects that deploy regularly.
GitHub's collaborative approach to development depends on publishing commits from your local repository to GitHub for other people to view, fetch, and update.
Learn to work with your local repositories on your computer and remote repositories hosted on GitHub.
Use a text editor to open and edit your files with Git.
To avoid problems in your diffs, you can configure Git to properly handle line endings.
You can configure Git to ignore files you don't want to check in to GitHub.
This Git cheat sheet is a time saver when you forget a command or don't want to use help in the CLI.
Help and support Ask Copilot your question. Ask Copilot