Introduction to GitHub Platform
π’ Beginner
π Definition
GitHub is a cloud-based web hosting platform for Git repositories that provides a graphical interface, collaboration tools, access controls, code review workflows, issue tracking, continuous integration (CI/CD), and open-source project management.
π Multilingual Explanation
English
GitHub hosts Git repositories online in the cloud. While Git is the local CLI tool that tracks version history, GitHub is the web platform where developers store backups, collaborate on team repositories, review Pull Requests, track bugs via Issues, and showcase portfolios.
Hindi
GitHub ek cloud platform hai jo aapke Git repositories ko online host karta hai. Git local tool hai aur GitHub online website hai jahan aap apna code backup rakh sakte hain, doosron ke saath collaborate kar sakte hain, aur apna developer portfolio bana sakte hain.
Marathi
GitHub mhanje Git repositories online cloud var sathavnyasathi asleli website. Git ha local tool aahe tar GitHub ha online platform aahe jithe code backup, team collaboration, aani portfolio tayar karta yeto.
Hinglish
Git local computer par chalta hai, jabki GitHub cloud web server hai. GitHub par aap public repositories banakar duniya ke saamne apna developer portfolio showcase kar sakte hain aur open-source projects mein contribute kar sakte hain.
π€ Why Do We Use It?
GitHub is the global developer social network and code ecosystem. Having a GitHub account allows you to backup projects safely, collaborate with remote teams, participate in open source, host static websites, and present your code to technical recruiters.
π§ Simple Explanation
Think of Git vs GitHub like videos on a smartphone:
- Git: The camera app on your phone recording videos locally on your phone storage.
- GitHub: YouTube β the cloud platform where you upload your recorded videos so anyone in the world can watch, comment, share, or collaborate!
π GitHub Repository Setup Steps
1. Creating a New Repository on GitHub
- Sign in to your account at github.com.
- Click the
+icon in the top right corner -> Select New repository. - Fill in Repository Details:
- Repository Name: e.g.
my-web-portfolio - Visibility: Public (visible to anyone) or Private (restricted access).
- Initialize Options: Uncheck README/gitignore if linking an existing local repository.
- Repository Name: e.g.
- Click Create repository.
2. Linking Local Repo to GitHub Repo
GitHub presents terminal instructions to link your local code:
# 1. Rename default local branch to main
git branch -M main
# 2. Add remote URL
git remote add origin https://github.com/your-username/my-web-portfolio.git
# 3. Push local commits to GitHub
git push -u origin main
π‘ Navigating the GitHub UI Tabs
| GitHub Tab | Purpose |
|---|---|
| Code | View repository directory tree, files, commits, branches, and releases |
| Issues | Bug tracker, feature requests, and task discussions |
| Pull Requests | Code review proposals submitted by team members or open-source contributors |
| Actions | CI/CD automation pipelines (testing, building, deploying code) |
| Projects | Kanban boards and sprint management planning |
| Settings | Repository access control, secrets, webhooks, and domain settings |
π Command Breakdown
git branch -M main: Forces renaming current active branch tomain(standard GitHub default).git push -u origin main: Uploads localmainbranch code to GitHuboriginremote.
π GitHub Web View
github.com/your-username/my-web-portfolio
βββ π README.md (Displayed on repository home page)
βββ π index.html
βββ π¨ style.css
βββ βοΈ .gitignore
β οΈ Common Mistakes
- Initializing README on GitHub AND Locally: Checking βAdd a README.md fileβ on GitHub web wizard when creating a repo for code that ALREADY exists locally. This creates diverged histories and triggers
failed to push some refserror.- Fix: Leave GitHub wizard checkboxes UNCHECKED when linking existing local code.
- Uploading Secret Keys: Uploading
.envfiles containing private passwords or API tokens to public GitHub repositories.
π‘οΈ Safety / Important Notes
- Public repositories on GitHub are indexed by search engines. Never upload personal sensitive information or secrets.
- GitHub automatically renders markdown files (
README.md) as structured documentation on repository homepages.
π Real-World Usage
Tech companies evaluate job applicants by inspecting their public GitHub repositories, commit histories, code quality, and open-source contributions.
π§ͺ Try It Yourself
- Create a free account on github.com if you havenβt already.
- Create a new public repository named
github-practiceon GitHub. Leave checkboxes unchecked. - Link your local
git-practicefolder to your new GitHub repository usinggit remote add origin <url>and executegit push -u origin main.
π― Mini Challenge
Refresh your GitHub repository web page in your browser and verify that your committed files and README appear live on GitHub!
π Related Topics
π§ Navigation
| β Home | β Previous: Fetching | Next: Forking & Pull Requests β |