git

🏠 Homepage

⬅️ Previous: πŸ” Setting up SSH Keys

9. 🌐 Connect Local Repo to Remote (GitHub)

git remote add origin git@github.com:username/repo.git

➑️ This command connects your local repository to a remote GitHub repository named origin.

πŸ”— Replace the URL with your actual repository URL.


10. Pushing First Commit

Once you’ve made your first commit locally, you need to connect your local repository to a remote repository (like GitHub) and push the code.

Use the -u flag with git push to set the upstream branch:

git push -u origin main

βœ… Now your local project is connected and pushed to GitHub!

➑️Up Next:πŸ“‹ Summary