git --version
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Open Command Palette Ctrl+Shift+P or Cmd+Shift+P and choose:
Git: Clone
Or use Command Palette:
Git: Push
git fetch origin
git checkout your-branch-name
git pull origin your-branch-name
git checkout master
git pull origin master
git checkout -b new-branch-name
git checkout -b your-new-branch
git add .
git commit -m "Your commit message"
git push -u origin your-new-branch
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin [your-repo-url]
git push -u origin main
Go to your GitHub repository settings and:
main branch and / (root) folder# Open in VS Code
code index.html
# Open in default browser (macOS)
open index.html
Follow these commands to back out of a current repo and begin working in a separate new one:
cd ..
cd your-folder-name
git clone [new-repo-url]
cd your-new-repo-folder
git add .
git commit -m "Initial project commit"
git push -u origin main