Skip to content

Instantly share code, notes, and snippets.

@justcoder1
Created July 31, 2021 10:13
Show Gist options
  • Save justcoder1/9aa18b2b42ad25e8bab34f4b0a4b0ec1 to your computer and use it in GitHub Desktop.
Save justcoder1/9aa18b2b42ad25e8bab34f4b0a4b0ec1 to your computer and use it in GitHub Desktop.
GITHub and GIT commands
**Creating a New Project**
1. Create a folder on your computer and start your work in VSc
2. Create a Repo on GITHub.
3. Then put these into GIT:
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/URL.git
git push -u origin main
**Creating a Local copy of remote REPO**
1. Create a folder on your computer
2. Then go to the REPO on GITHub and get the URL of the REPO from the GREEN Code Button
3. Then put these into GIT:
git init
git branch -M main
git remote add origin https://github.com/URL.git
git pull https://github.com/URL.git main
**Connecting REPO to Netlify for Single Page Apps**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment