Kaleb’s Git Notes

Git Notes

  1. Move to the the folder that your project is located in and set up Git using:

$ git init
  1. Add the files you want to add. Use “.” to add all files

$ git add .
  1. Save the changes for your files with a message

$ git commit -m "[Insert Message Here]"
  1. Add the URL where the server is located in

$ git remote add origin [URL]
  1. Set the branch to main or whatever it’s called

$ git branch -M main
  1. Push the changes to the server

$ git push -u origin main