Tuesday, June 3, 2025

Git Setup on Windows

 

1. Install Git for Windows

  • Download and install from: https://git-scm.com/

  • During setup:

    • Choose “Git from the command line and also from 3rd-party software”

    • Choose recommended defaults unless you have special needs

✅ After install, open Git Bash or CMD and run:

git --version

2. Clone Your Laravel + Vue Project

cd C:\xampp\htdocs git clone https://github.com/your-username/your-laravel-vue-project.git cd your-laravel-vue-project

Or initialize a new repo:

git init

3. Set Git User Info (if not set globally)

git config user.name "Your Name"
git config user.email "you@example.com"

4. Typical Git Workflow (Basic Commands)

ActionCommand
Stage changes        git add .
Commit changesgit commit -m "Your message"
Push to remotegit push origin main
Pull latestgit pull origin main
Check statusgit status
Switch branchgit checkout branch-name

5. Optional Git GUI Tools for Windows

If you prefer visual tools:


✅ Laravel + Git Example Setup

In C:\xampp\htdocs\your-project:


composer install npm install cp .env.example .env php artisan key:generate git init git remote add origin https://github.com/your-username/your-repo.git git add . git commit -m "Initial commit" git push -u origin main

No comments:

Post a Comment