Skip to content
GitHub

Installation & Identity

Git ကို Install လုပ်ခြင်း

Section titled “Git ကို Install လုပ်ခြင်း”
  • https://git-scm.com/downloads ကို သွားပါ။
  • ကိုယ်သုံးနေတဲ့ OS (Windows, macOS, Linux) အတွက် Installer ကို Download လုပ်ပြီး Install လုပ်ပါ။ (များသောအားဖြင့် Default Setting တွေအတိုင်း သွားရင် အဆင်ပြေပါတယ်)
  • Install လုပ်ပြီးကြောင်း သေချာစေဖို့ Terminal (သို့မဟုတ် Windows ဆိုရင် Git Bash) ကို ဖွင့်ပြီး git --version လို့ ရိုက်ကြည့်ပါ။ Version နံပါတ် ပေါ်လာရင် အဆင်ပြေပါပြီ။

Git ကိုယ်ပိုင်အချက်အလက် သတ်မှတ်ခြင်း

Section titled “Git ကိုယ်ပိုင်အချက်အလက် သတ်မှတ်ခြင်း”

Git က ကိုယ်လုပ်လိုက်တဲ့ ပြောင်းလဲမှု (Commit) တိုင်းမှာ လုပ်ဆောင်သူရဲ့ နာမည်နဲ့ Email ကို မှတ်တမ်းတင်ထားပါတယ်။ အထူးသဖြင့် Team နဲ့ အလုပ်လုပ်တဲ့အခါ ဘယ်သူက ဘာကို ပြောင်းလဲခဲ့လဲ ဆိုတာကို အလွယ်တကူ သိနိုင်ဖို့အတွက် ဒါက အရမ်း အရေးကြီးပါတယ်။

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

--global ဆိုတာက ကိုယ့် ကွန်ပျူတာထဲက Project အားလုံးအတွက် တစ်ခါတည်း သတ်မှတ်ပေးလိုက်တာ ဖြစ်ပါတယ်။

ပထမဆုံး Repository ဖန်တီးခြင်း

Section titled “ပထမဆုံး Repository ဖန်တီးခြင်း”

Repository (Repo) ဆိုတာ ဘာလဲ?

Section titled “Repository (Repo) ဆိုတာ ဘာလဲ?”

Git Repository ဆိုတာ ကိုယ့် Project ရဲ့ ဖိုင်တွေ အားလုံးနဲ့ ပြောင်းလဲမှု သမိုင်းကြောင်း အစအဆုံးကို Git က မှတ်တမ်းတင်ထားတဲ့ Folder တစ်ခု ဖြစ်ပါတယ်။ လွယ်လွယ်ပြောရရင် Project ရဲ့ သီးသန့် “မှတ်တမ်းရုံး” လို့ မှတ်ယူနိုင်ပါတယ်။

git init Command ဖြင့် ဖန်တီးခြင်း

Section titled “git init Command ဖြင့် ဖန်တီးခြင်း”

git init ဆိုတာ ပုံမှန် Folder တစ်ခုကို Git Repository အဖြစ် ပြောင်းလဲပေးတဲ့ Command ပါ။ Git က အဲ့ဒီ Folder ထဲမှာ မှတ်တမ်းတွေ စတင် သိမ်းဆည်းဖို့ လိုအပ်တဲ့ ဖိုင်တွေ (Hidden Files) ကို အလိုအလျောက် ဖန်တီးပေးပါတယ်။

Terminal တွင် လုပ်ဆောင်ရန်:

  • ကိုယ့် Project Folder ထဲကို ဝင်ပါ: cd path/to/your/project (ဥပမာ - cd Documents/my-project)
  • ပြီးရင် git init လို့ ရိုက်ထည့်ပါ။
  • Terminal မှာ Initialized empty Git repository in ... ဆိုပြီး ပေါ်လာပါလိမ့်မယ်။
git init command

git init ကို သုံးလိုက်တာနဲ့ Hidden ဖြစ်နေတဲ့ .git Folder တစ်ခု ပေါ်လာပါမယ်။ ဒါဟာ Git က ကိုယ့် Project ရဲ့ မှတ်တမ်းတွေ အားလုံးကို သိမ်းဆည်းထားတဲ့ နေရာ ဖြစ်ပါတယ်။

သတိထားရန်: ဒီ Folder ကို ကိုယ်တိုင် သွားပြင်တာ ဒါမှမဟုတ် ဖျက်တာမျိုး လုံးဝ (လုံးဝ) မလုပ်ပါနဲ့။ Git က သူ့ဘာသာ စနစ်တကျ စီမံသွားမှာ ဖြစ်ပါတယ် ခင်ဗျာ။

.git folder