Title: How to Use GitHub – Real Python
Open Graph Title: How to Use GitHub – Real Python
Description: Learn how to use GitHub step by step to create a remote repository, push your local Python project, and collaborate with others using GitHub Issues.
Open Graph Description: Learn how to use GitHub step by step to create a remote repository, push your local Python project, and collaborate with others using GitHub Issues.
Mail addresses
?subject=Python article for you&body=How to Use GitHub on Real Python
https://realpython.com/how-to-use-github/
Opengraph URL: https://realpython.com/how-to-use-github/
X: @realpython
Domain: realpython.com
{
"@context": "http://schema.org",
"@type": "Article",
"headline": "How to Use GitHub",
"image": {
"@type": "ImageObject",
"url": "https://files.realpython.com/media/How-to-Use-GitHub.2542b35787ba.jpg",
"width": 1920,
"height": 1080
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://realpython.com/how-to-use-github/",
"lastReviewed": "2026-09-01",
"author": {
"@type": "Person",
"name": "Raahil Mahetaji",
"image": "https://realpython.com/cdn-cgi/image/width=536,height=536,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/RaahilMahetaji_1.89ba3ef3d571.png",
"url": "https://realpython.com/team/rmahetaji/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
"reviewedBy": [
{
"@type": "Person",
"name": "Aldren Santos",
"image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
"url": "https://realpython.com/team/asantos/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Brenda Weleschuk",
"image": "https://realpython.com/cdn-cgi/image/width=320,height=320,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/IMG_3324_1.50b309355fc1.jpg",
"url": "https://realpython.com/team/bweleschuk/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Bartosz Zaczy\u0144ski",
"image": "https://realpython.com/cdn-cgi/image/width=1694,height=1694,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/coders_lab_2109368.259b1599fbee.jpg",
"url": "https://realpython.com/team/bzaczynski/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Leodanis Pozo Ramos",
"image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
"url": "https://realpython.com/team/lpozoramos/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
{
"@type": "Person",
"name": "Philipp Acsany",
"image": "https://realpython.com/cdn-cgi/image/width=1920,height=1920,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/pacsany.19bcf16f5a00.jpg",
"url": "https://realpython.com/team/pacsany/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
}
]
},
"datePublished": "2026-07-08T14:00:00+00:00",
"dateModified": "2026-09-01T06:01:25.650790+00:00",
"publisher": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": {
"@type": "ImageObject",
"url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
"width": 512,
"height": 512
},
"description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
"slogan": "Become a Python Expert",
"email": "info@realpython.com",
"sameAs": [
"https://github.com/realpython",
"https://www.youtube.com/realpython",
"https://twitter.com/realpython",
"https://x.com/realpython",
"https://www.linkedin.com/company/realpython-com/",
"https://www.facebook.com/learnrealpython",
"https://www.instagram.com/realpython",
"https://www.tiktok.com/@realpython.com"
]
},
"author": {
"@type": "Person",
"name": "Raahil Mahetaji",
"image": "https://realpython.com/cdn-cgi/image/width=536,height=536,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/RaahilMahetaji_1.89ba3ef3d571.png",
"url": "https://realpython.com/team/rmahetaji/",
"affiliation": {
"@type": "Organization",
"@id": "https://realpython.com/#organization",
"name": "Real Python",
"url": "https://realpython.com",
"logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
}
},
"description": "Learn how to use GitHub step by step to create a remote repository, push your local Python project, and collaborate with others using GitHub Issues.",
"hasPart": {
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "Is GitHub the same as Git?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eNo. \u003ca href=\"/ref/tools/git/\" class=\"ref-link\"\u003eGit\u003c/a\u003e is the underlying version control software installed on your local computer. It manages the history of your files offline. GitHub is a remote hosting service and web platform owned by Microsoft. It provides a destination to upload your Git repositories so you can view them online and share them with others. Git works on its own without GitHub, but GitHub always relies on Git.\u003c/p\u003e"
}
},
{
"@type": "Question",
"name": "Do I need to pay for GitHub to collaborate with others?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eNo. GitHub offers a free tier that\u0026rsquo;s perfectly sufficient for personal projects, portfolios, and even small professional teams. You can create unlimited public and private repositories, and you can invite outside collaborators to your private repositories without needing a paid subscription.\u003c/p\u003e"
}
},
{
"@type": "Question",
"name": "Can I change my public repository to a private repository later?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eYes. You can change the visibility of your repository at any time. Navigate to your repository on GitHub, click the \u003cem\u003eSettings\u003c/em\u003e tab, and scroll down to the \u003cem\u003eDanger Zone\u003c/em\u003e section. Click the button to \u003cem\u003eChange repository visibility\u003c/em\u003e and select your preferred setting. Note that if your repository was public, other users might have already downloaded a copy of your code before you made it private.\u003c/p\u003e"
}
},
{
"@type": "Question",
"name": "What if I initialized my repo with a README?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eIf you checked the box to initialize the repository with a README, GitHub created a commit. When you attempt to run \u003ccode\u003egit push\u003c/code\u003e from your local machine, the terminal will reject the push because the remote repository has a history that doesn\u0026rsquo;t match your local history.\u003c/p\u003e\n\u003cp\u003eThe safest fix for a beginner is to delete the GitHub repository entirely. Go to the repository \u003cem\u003eSettings\u003c/em\u003e, scroll to the very bottom to \u003cem\u003eDanger Zone\u003c/em\u003e, and click \u003cem\u003eDelete this repository\u003c/em\u003e. Create a new repository from scratch, ensuring you leave the initialization checkboxes blank, and then try pushing your local code again.\u003c/p\u003e"
}
},
{
"@type": "Question",
"name": "Why is password authentication not supported?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eGitHub removed standard password authentication for security reasons. When your terminal asks for a password during \u003ccode\u003egit push\u003c/code\u003e, you can\u0026rsquo;t use the password you use to log in to the website.\u003c/p\u003e\n\u003cp\u003eInstead, you must generate a Personal Access Token (PAT). Under your GitHub Settings, go to \u003cem\u003eDeveloper\u003c/em\u003e settings, then \u003cem\u003ePersonal access tokens\u003c/em\u003e. GitHub offers two options. Fine-grained tokens are highly recommended, since you can restrict them to specific repositories. Tokens (classic) apply broadly across your account. Generate a token, copy the resulting string, and paste it into your terminal when prompted for a password.\u003c/p\u003e\n\u003cp\u003eAlternatively, you can install the Git Credential Manager, which securely handles authentication via a pop-up so you never have to copy and paste tokens.\u003c/p\u003e"
}
},
{
"@type": "Question",
"name": "Why did my new GitHub issue start at #2 even after I deleted issue #1?",
"acceptedAnswer": {
"@type": "Answer",
"text": "\u003cp\u003eGitHub issue numbers are unique identifiers that continuously increase over time. When you create an issue, GitHub permanently reserves that number for the repository, even if the issue is later deleted or closed. For example, if you create issue \u003ccode\u003e#1\u003c/code\u003e and then delete it, the next issue you create will still become \u003ccode\u003e#2\u003c/code\u003e rather than reusing \u003ccode\u003e#1\u003c/code\u003e.\u003c/p\u003e"
}
}
]
}
}
| author | Real Python |
| theme-color | #18354c |
| color-scheme | light dark |
| twitter:card | summary_large_image |
| twitter:image | https://files.realpython.com/media/How-to-Use-GitHub.2542b35787ba.jpg |
| og:image | https://files.realpython.com/media/How-to-Use-GitHub.2542b35787ba.jpg |
| twitter:creator | @realpython |
| og:type | article |
| og:site_name | Real Python |
| apple-mobile-web-app-title | Real Python |
Links:
Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover
Robots: max-image-preview:large