How can I push the origin main normally?

Whie I push the website code into git with the following command. it always shows “Everything up-to-date” but nothing happened there, cab anyone help me out?
$ git push -u origin main
Everything up-to-date
branch ‘main’ set up to track ‘origin/main’.


Things to make sure:

There is a remote repository declared.

Type git remote -v

You can also type git log --online to see


As you can see above, master (in green) is aligned with origin/master (in red)
The presence of origin/master tells there is a remote repo.
Should I try to push anything I would get a message like the one you are getting.

If there is no remote repo, create a new one on a service such as GitLab, GitHub or Bitbucket to name a few.

Then retrieve the repo link and add it to your local repo like this

git remote add origin remote_repo_url. where remote_repo_url looks something like or

If you prefer, use a visual tool to perform such operation.

You can also make sure you properly committed anything.

You need to add content to staging area with git add command (useful commands git add . or git add -A to add everything or add space separated folder/files) and then actually commit it with git commit (useful command is git commit -m "Commit message")


Thanks! it was solved.