Git မိတ်ဆက်

Project တစ်ခုကို ပြင်လာတာကြာရင် ဘာပြောင်းခဲ့လဲ၊ ဘယ်သူက ဘယ်အချိန်မှာ မှတ်တမ်းတင်ခဲ့လဲဆိုတာ ပြန်သိဖို့ လိုလာပါတယ်။ Git က အဲဒီမှတ်တမ်းကို ကိုယ့်စက်ထဲမှာ သိမ်းထားပေးနိုင်တဲ့ version control tool တစ်ခုပါ။

ဒီစာမျက်နှာမှာ

Git ထည့်သွင်းပြီး Version စစ်ခြင်း

Windows၊ macOS နဲ့ Linux အတွက် အောက်က Git official installation guide ကို သုံးပါ။ Windows မှာ ဒီနမူနာတွေကို Git Bash နဲ့ လိုက်စမ်းလို့ရပါတယ်။ Install လုပ်ပြီးရင် terminal ပြန်ဖွင့်ပြီး version စစ်ပါ။

git --version

Commit အတွက် နာမည်နဲ့ Email သတ်မှတ်ခြင်း

Git က commit အသစ်တွေမှာ ဒီနာမည်နဲ့ email ကို မှတ်တမ်းတင်ပါတယ်။ နမူနာနေရာမှာ ကိုယ့်အချက်အလက်ကို ထည့်ပါ။ GitHub ပေါ် တင်တဲ့အခါ email ကို ဖျောက်ထားချင်ရင် GitHub ရဲ့ email settings ထဲက noreply address ကို သုံးပါ။

git config --global user.name "Alex Rivera"
git config --global user.email "alex@example.com"
git config --get user.name
git config --get user.email

Local Repository ဆောက်ခြင်း

Repository က Project ရဲ့ history ကို သိမ်းပါတယ်။ လိုက်စမ်းဖို့ သီးသန့် folder တစ်ခုဆောက်ပြီး main ဆိုတဲ့ branch နဲ့ Git စသုံးပါ။ ဒီ project ကို နောက်သင်ခန်းစာတွေမှာ ဆက်သုံးပါမယ်။

mkdir project-notes
cd project-notes
git init -b main
git status

တရားဝင် ကိုးကားချက်များ