Create some code in VScode or some other code editor or IDE? Want to post it to Github? Want to know an efficient way to do it specifically for this use case? Then this is the article for you!
If you're like me, you never create a repository on Github first and then link it to your local project before you even begin said project. Kudos to those that do, but for the rest of us mere mortals here is what I like to think of as the definitive simple way to post your existing local project to Github.
step 1 - git init -b main
step 2 - git add . && git commit -m "initial commit"
step 3 - (create repo on Github + copy url - ie. .git thing)
step 4 - git remote add origin (theurl.git thing)
step 5 - git push origin main
That's it. Hope this helps.
Questions? DM me.
@adamtimuraslan on Twitter
Top comments (0)