Posts

Showing posts from May, 2025

Useful Git Commands for Windows

Git Commands for Windows 1. Initial Setup git config --global user.name "Your Name" git config --global user.email "your.email@example.com" git config --global core.editor "code --wait" 2. Repository Basics git init git clone https://github.com/username/repo.git git status git config --list 3. Staging & Committing git add filename.txt git add . git commit -m "Your commit message" git commit -am "Quick commit" 4. Branching git branch feature-branch git checkout feature-branch git checkout -b new-branch git branch 5. Working with Remotes git remote add origin https://github.com/user/repo.git git remote -v git push origin branch-name git pull origin branch-name 6. Merging and Rebasing git checkout main git merge feature-branch git checkout feature-branch git rebase main ...