Initialize a Git repository:
git init
(env) a****h@Andis-MacBook-Pro WEB NEWS % git init
(env) a****h@Andis-MacBook-Pro WEB NEWS % git add .
(env) a****h@Andis-MacBook-Pro WEB NEWS % git commit -m "Initial commit"
[main 0c213a3] Initial commit
1 file changed, 0 insertions(+), 0 deletions(-)
It looks like there might be an issue with the branch name you are trying to push. It seems that the default branch name might be 'main' instead of 'master'. GitHub has started using 'main' as the default branch name for new repositories.
Here are the steps to correct the issue:
1. First, make sure you are in the correct branch. Check the name of the default branch by running:
git branch
(env) a****h@Andis-MacBook-Pro WEB NEWS % git remote set-url origin https://github.com/hermantoXYZ/Online-News-Portal-Django.git
(env) a****h@Andis-MacBook-Pro WEB NEWS % git push -u origin main
Counting objects: 100% (19132/19132), done.
Delta compression using up to 8 threads
Compressing objects: 100% (12484/12484), done.
Writing objects: 100% (19132/19132), 81.63 MiB | 966.00 KiB/s, done.
Total 19132 (delta 5764), reused 15580 (delta 5055), pack-reused 0
remote: Resolving deltas: 100% (5764/5764), done.
To https://github.com/hermantoXYZ/Online-News-Portal-Django.git
* [new branch] main -> main
(env) a*****@Andis-MacBook-Pro WEB NEWS % git pull origin main
* branch main -> FETCH_HEAD
Already up to date.
Test
ReplyDelete