- Create a dedicated directory for your project on your computer.
(Remember, you can use the
mkdir
command to make a new directory, andcd
to navigate to it) - Copy all your project-related files or stater code into this folder
(Remember to maintain the same folder structure. For homeworks, starter code lives within the
Develop
folder) - Inside your new project folder, run the following commands:
git init
git add .
git commit -m "initial commit"
-
Create a new repo on Github (You should have a seperate repo for each project or homework assignment)
-
Run the following commands in your project folder
git remote add origin <url to your new Git Repo>
git branch -M main
git push -u origin main
To update an existing repo with changes you've made, navigate to that folder and run the following commands:
git add .
git commit -m "<your commit message here>"
git push