1. init your local local repository
cd /path/to/your/project # Go to your project directory
git init # Initialize a Git repository
git add . # Add all files
git commit -m "Initial commit" # Commit the changes
2. Push the local repository to the remote
git remote add origin https://github.com/kkju1123/courseSummary.git
git branch -M main # Rename to 'main' (optional but standard)
git push -u origin main # Push to GitHub
3. what does -u mean
-u is short for --set-upstream
From now on, link the local main branch to the origin/main branch on GitHub, so you don’t need to specify them every time.
Top comments (0)