This guide explains how to set up the project in Visual Studio Code using Git CLI, and how to make, commit, and push code changes to the repository.
Clone the project from the Git server using the repository URL:
git clone git@192.168.1.38:ProjectName.git
Replace
ProjectName.git
with your actual project name.
Navigate into the cloned project folder and open it in Visual Studio Code:
cd ProjectName
code .
Install all required packages using npm or pnpm:
npm install
# OR
pnpm install
Note for pnpm users: If some scripts are not executed correctly, run:
pnpm approve-builds
- Use the space bar to select all packages.
- Press Y to confirm and approve.
After installing all required packages using npm or pnpm run the project using the below command:
npm run dev # or npm start
# OR
pnpm dev
Configure your Git identity for commits:
git config user.name "Your Name"
git config user.email "youremail@example.com"
Make your desired code or file changes using VS Code.
Stage the files you want to commit:
git add .
⚠️ Only stage the files you intend to commit. Avoid including sensitive configuration files unless necessary.
Commit with a descriptive message and your name:
git commit -m "Your commit message - Your Name"
Push the committed changes to the remote repository:
git push -u origin main
You’ve successfully set up the project, made changes, and pushed them using Git and VS Code. Happy coding! 💻