Configure your Git username and email:
git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"
Initialize Repository:
git init
Add Files to Staging:
git add .
Commit Changes:
git commit -m "Initial commit"
Create a Branch:
git checkout -b new-feature
Switch Branches:
git checkout main
Merge Branches:
git merge new-feature
Configuring .gitignore Create a .gitignore file in the root of your project directory. Specify patterns for files and directories you want to ignore. here you area sample
# Ignore all .log files
*.log
# Ignore node_modules directory
node_modules/
# Ignore all files in the temp directory
temp/