Chapter 2Git & GitHub~1 min read
Git Install आणि Setup
पहिली Git Configuration
Git वापरण्यासाठी आधी install करावं लागतं. Mac वर Homebrew ने, Windows वर git-scm.com वरून installer download करा, Linux वर apt/yum वापरा.
Install & verify
bash
# Mac (Homebrew)
brew install git
# Ubuntu/Debian
sudo apt install git
# Windows — git-scm.com वरून download करा
# Version check
git --version
# git version 2.x.xGlobal Config — एकदाच करायचं
Git install केल्यावर तुमचं नाव आणि email set करा. हे प्रत्येक commit सोबत record होतं — team ला कळतं कोणी commit केलं.
Initial git config
bash
git config --global user.name "Avadhoot Galande"
git config --global user.email "avadhoot@example.com"
# Default branch name set करा
git config --global init.defaultBranch main
# Config बघा
git config --listनवीन Repository बनवणे
git init — project folder ला git repository बनवा
bash
# नवीन folder बनवा आणि initialize करा
mkdir my-project
cd my-project
git init
# Output:
# Initialized empty Git repository in /my-project/.git/
# किंवा existing folder मध्ये
cd existing-project
git init💡
`.git` नावाचा hidden folder बनतो — हाच Git चा database आहे. तो delete करू नका, नाहीतर सगळी history जाईल!
✅ Key Points — लक्षात ठेवा
- ▸git config --global — एकदाच set करा
- ▸git init — project ला git repository बनवतो
- ▸.git folder = git database
- ▸git --version — installation verify करा
0/10 chapters पूर्ण