Skip to main content

Git vs GitHub සිංහලෙන් | Git vs GitHub in Sinhala

 

Git vs GitHub 

හැමෝටම ඇති Confusion එක

“ඉන්නකෝ… Git සහ GitHub කියන්නේ වෙන වෙනම දේවල්ද?”

ඔයාටත් මේ confusion එක තිබුණා නම්, ඒක සාමාන්‍ය දෙයක්. බොහෝ beginners ලා Git සහ GitHub එකම දෙයක් කියලා හිතනවා. නැත්තම්, දෙකම එකිනෙකට හුවමාරුවෙන් භාවිතා කරනවා , ඇත්තටම ඒවා කරන වැඩ තේරුම් නොගෙන.

ඇත්තම කතාව:
👉 Git සහ GitHub සම්බන්ධයි, නමුත් එකම දේ නෙමෙයි.
Modern software development හොඳින් ඉගෙනගන්න නම්, මේ දෙක අතර වෙනස තේරුම් ගන්න එක පළමු පියවරයි.

අපි මේක අදම clear කරගමු.

Git කියන්නේ මොකක්ද?

Git කියන්නේ version control system එකක්.
සරලව කිව්වොත්, ඔයා ලියන code එක කාලයත් සමඟ වෙනස් වෙද්දී ඒ changes track කරන software එකක්.

Microsoft Word එකේ තියෙන “Track Changes” feature එක programmers ලාට තිබුණා නම්, ඒක තමයි Git.

🔹 Git run වෙන්නේ ඔයාගේ computer එකේ (local machine)
🔹 Internet අවශ්‍ය නෑ
🔹 Account එකක් ඕනේ නෑ
🔹 Free සහ open-source
🔹 Offline full වැඩ කරයි

Git කරන දේවල්:

  •  Code එකේ snapshots save කරනවා (ඒවට කියන්නේ commits)

  •  පරණ version එකකට “time travel” කරලා ආපහු යන්න පුළුවන්

  • Branches හදලා main code එක කැඩෙන්න නැතිව අලුත් features try කරන්න පුළුවන්

  •  Developers ලාගේ changes එකට merge කරන්න පුළුවන්

Real-world analogy (සරල උදාහරණයක්):
Git කියන්නේ save points තියෙන video game එකක් වගේ.
අලුත් දේ try කළා, fail වුණා කියලා බය වෙන්න ඕනේ නෑ. Save point එකකට reload කරලා ආපහු යන්න පුළුවන්.

GitHub කියන්නේ මොකක්ද?

GitHub කියන්නේ cloud platform එකක්.
Git repositories online store කරන තැන.

සරලව කිව්වොත්:
👉 Code සඳහා Google Drive වගේ එකක්
නමුත් extra superpowers එක්ක – collaboration, issues, pull requests වගේ දේවල්.

GitHub කියන්නේ website එකක් (github.com)
Company එකක් (Microsoft own කරනවා)
GitLab, Bitbucket වගේ alternatives තියෙනවා
Account එකක් ඕනේ
Public projects සඳහා free

GitHub කරන දේවල්:

  • Code online host කරනවා (backup + anywhere access)

  • Team collaboration පහසු කරනවා

  • Project management tools (issues, pull requests, discussions)

  • ඔයාගේ වැඩ showcase කරන්න පුළුවන් (GitHub profile = developer portfolio)

Real-world analogy:
Git Microsoft Word නම්, GitHub Google Docs වගේ.
File එක online, share කරන්න පුළුවන්, එකම වෙලාවේ කීදෙනෙක් එක්ක collaborate කරන්නත් පුළුවන්.

Main Difference එක (Key Difference)

GitGitHub
Version control softwareCloud hosting service
Computer එකේ locally run වෙනවාOnline / cloud එකේ
Offline වැඩ කරයිInternet ඕනේ
Free & open-sourceMicrosoft own කරන platform
Code history manage කරනවාCollaboration facilitate කරනවා

මතක තියාගන්න සරල විදිහ:

  • Git = Changes track කරන tool එක

  • GitHub = Git projects share කරන website එක

Developers ලාට දෙකම වැදගත් වෙන්නේ ඇයි?

Git – Control එක ඔයා අතට

Git නැත්නම්:

  • Code එක break වුණාම panic

  • “මොන line එකද මම වෙනස් කළේ?” කියලා හොය හොයා ඉන්න වෙනවා

  • අලුත් feature try කරන්න කලින් entire folder copy-paste

Git එක්ක:

  • Fearless experimentation

  • හැම change එකක්ම track වෙනවා

  • “නැතිවෙලා ගියා” කියන concept එක practically නෑ

GitHub – Community එක

GitHub නැත්නම්:

  • Code email කරනවා

  • Pen drive වලින් files exchange

  • Full chaos

GitHub එක්ක:

  • Team work smooth

  • Code safe (backup)

  • Employers ලාට projects බලන්න පුළුවන්

  • Open-source community grow වෙනවා

Getting Started: Essential Git Commands

1. Git Install කිරීම

Windows / Mac / Linux:
👉 git-scm.com වෙතින් download කරන්න

Check installation:

git --version

2. Git Configure කිරීම (First time only)

git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"

3. Repository එකක් Initialize කිරීම

mkdir my-project
cd my-project
git init

මෙතන .git folder එක create වෙනවා.
👉 දැන් project එක Git track කරනවා.

4. Changes Track & Save කිරීම

Files staging area එකට add කරන්න:

git add filename.txt

සියල්ල add කරන්න:

git add .

Commit (snapshot save):

git commit -m "Initial commit"

5. GitHub එක්ක Connect වීම

GitHub side:
New repository එකක් create කරන්න (README initialize කරන්න එපා)

Computer එකේ:

git remote add origin https://github.com/yourusername/repository-name.git
git branch -M main
git push -u origin main

👉 දැන් code එක GitHub එකේ!

6. Daily Basic Workflow

git status
git add .
git commit -m "Description of what you changed"
git push

GitHub එකෙන් changes pull කරන්න:

git pull

Common Beginner Mistakes

❌ “මම GitHub install කළා” → Actually Git install කළා
❌ “Git use කරන්න GitHub ඕනේ” → නෑ, Git offline වැඩ කරනවා
❌ “Git = GitHub” → නෑ, දෙකම වෙන වෙනම tools

Employers ලාට මේක වැදගත් ඇයි?

අද developer job එකකට Git skills mandatory.

👉 ඒකෙන් පෙන්නන්නේ:

  • Version control දන්නවා

  • Team එකක් එක්ක work කරන්න පුළුවන්

  • Industry standards follow කරනවා

GitHub profile = Developer resume.
Employers ලා, recruiters ලා ඒක බලනවා.
Public repositories ඔයාගේ skills live demo එකක්.


Beginners සඳහා Quick Tips

Tip 1: Often commit කරන්න, clear messages එක්ක
👉 “Fixed login bug” > “changes”

Tip 2: New features සඳහා branches use කරන්න

git branch feature-name
git checkout feature-name

Tip 3: Small personal projects වල practice කරන්න


Free Resources (Free learning)

  • Git Official Docs – git-scm.com/doc

  • GitHub Skills – skills.github.com

  • FreeCodeCamp Git – YouTube

  • Oh My Git! (Game-based learning) – ohmygit.org

Tools දෙකක් – Workflow එකක්

Git සහ GitHub competitors නෙමෙයි.
👉 Partners.

  • Git – local machine එකේ version control power

  • GitHub – ඒ power එක cloud එකට extend කරනවා

දෙකම master කළොත්, modern software development වල අත්‍යවශ්‍ය skill එකක් unlock වෙනවා.

Beginners → Developers
එක git commit එකෙන් එක.


Comments

Popular posts from this blog

Linux ඇත්තටම වැඩ කරන්නේ කොහොමද? | How Actualy Linux Works in Sinhala

Linux ඇත්තටම වැඩ කරන්නේ කොහොමද (Filesystem, Kernel සහ Processes විස්තරාත්මකව) Linux තේරුම් ගැනීම වැදගත් වන්නේ ඇයි? Linux හැම තැනම තියෙනවා , servers වල, smartphones වල, cloud platforms වල, supercomputers වල, space missions වල පවා. ඒත් බොහෝ beginners ලාට Linux දැනෙන්නේ අමුතු commands සහ අමුතු folders පිරුණු  "Black box" එකක්  විදියට. Linux ඇතුළතින් ඇත්තටම වැඩ කරන ආකාරය තේරුම් ගැනීම , commands type කරන විදිය විතරක් නෙවෙයි හැමදේම වෙනස් කරනවා. ඒක Linux එක ඔබ use කරන දෙයකින් ඔබ control කරන දෙයකට පරිවර්තනය කරනවා. students, developers, cybersecurity ඉගෙන ගන්න බොහෝ  දෙනෙකුට , සහ අනාගත engineers ලාට මේ දැනුම දිගු කාලීන වාසියක්. Linux එක නගරයක් වගේ හිතන්න: Kernel එක නගර පාලනයයි —සම්පත් කළමනාකරණය කරලා නීති බලාත්මක කරනවා. Filesystem එක නගරයේ සැලැස්මයි —හැමදේම store කරලා organize කරලා තියෙන ආකාරය. Processes මිනිස්සු සහ වාහන —ක්‍රියාකාරීව වැඩ කරන programs. සෑම කොටසකටම පැහැදිලි කාර්යභාරයක් තියෙනවා, එකට ඒවා system එක stable, fast සහ secure කරනවා. 1. Linux Filesystem:  Li...

Bash Basics: Linux වල සරල කාර්යයන් ස්වයංක්‍රීය කිරීම | Bash Automation Basics In Sinhala

  Bash Basics: Linux වල සරල කාර්යයන් ස්වයංක්‍රීය කිරීම මේ වගේ වැඩ ටිකක් කරන්න වුනොත් ඔයා කොහොමද ඒක කරන්නේ  ? ඔබට අවශ්‍යයි  කියලා හිතන්න: Files 500ක් rename කරන්න දිනපතා folders backup කරන්න පැයකට වරක් server health check කරන්න සතිපතා data reports process කරන්න ඔයාට මේවා manually කරන්න පුළුවන්. click කරන්න, type කරන්න, නැවත නැවත කරන්න හෝ ඔබට සරල Bash script එකක් ලියලා ඔබේ computer එකට එය handle කරන්න දෙන්න පුළුවන් ඔබ වඩාත් interesting දෙයක් මත focus වෙන අතරතුර. Bash (Bourne Again Shell) Linux හි built-in scripting language එක. මේක complicated programming එකක් නෙවෙයි. මේක ඔබ දැනටමත් දන්න commands, file එකක ලියලා automatically execute කරනවා. Students, developers, system administrators, සහ repetitive tasks වලින් මහන්සි වෙච්ච හැමෝටම, Bash productivity superpower එකක්. Bash කියන්නේ මොකක්ද? Bash කියන්නේ Linux වල command-line interpreter එක. ඔබ commands type කරන shell එක, ඒත් එය scripting language එකක් කියන්නත් පුළුවන් , ඒ Bash Scripting ,commands automated workflow...

Linux Networking Basics Beginners Practical Guide In Sinhala

Linux Networking Basics: IP, DNS සහ Routing Explained – Beginners  Practical Guide  හැඳින්වීම (Introduction) Linux system එකක් Internet එකට connect වෙලා තියෙනවද? Server එකක් reachable ද? Website එක load වෙන්නේ ඇයි, නැත්නම් ඇයි fail වෙන්නේ? මෙවැනි ප්‍රශ්නවල root එක තියෙන්නේ   Linux Networking Basics වල. Cybersecurity, ethical hacking, system administration, cloud engineering මේ හැම field එකකටම IP, DNS, Routing කියන්නේ අනිවාර්ය මූලික දැනුමක්  . IP Address කියන්නේ මොකක්ද? (Understanding IP) IP Address කියන්නේ network එකක් තුළ device එකක් identify කරන unique number එකක්. හරියට  Phone number එකක් වගේ: Call කරන්න phone  number එකක් ඕන Data send කරන්න IP ඕන Common IP Types IPv4 → 192.168.1.10 IPv6 → Modern networks සඳහා Linux system එකේ IP බලන්න: ip a or ifconfig Cybersecurity perspective: Wrong IP configuration → No connectivity Exposed public IP → Attack surface DNS කියන්නේ මොකක්ද? (Name to IP Translator) DNS (Domain Name System) කියන්නේ Website na...