Step 1: Create new Repo in Github
Step 2: In local, using
git init
git add .
git commit -m "message"
git remote add origin https://github.com/ptmkhanh29/embedded-blog-personal-django-reactjs.git
- Because I'm add README.md in repo Github, I have to use this command to sync all commit history
git pull origin main --allow-unrelated-histories
git push origin main
Step 3: Set your current branch as a tracking branch on the remote repository
git add .
git commit -m "message"
git push --set-upstream origin main
Then use normal git push
git push
to push new code into repo