Unable to push code from vs code

! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘https://github.com/Vidushiii/digikaksha.git
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.

Getting this error again and again.
please help me out

@Vidushiii ,

According to the error message,

Updates were rejected because the tip of your current branch is behind its remote counterpart. Integrate the remote changes (e.g. ‘git pull …’) before pushing again.

If there are some other commits were pushed to the remote master before your push, but your local master does not sync these commits from the remote, the local master is out-of-date with the remote master. When you push your commits from your local to the remote, generally this error will occur.

To solve this error, you can try with the steps below:

  1. Copy the local repository to a temporary folder (named ‘Temp’) outside of the directory of the local repository.

  2. On VS code, switch to ‘Source Control’ tab, click ‘’ > ‘Pull, Push’ >‘Pull’ to sync the latest code from the remote to the local.

  3. Filter and copy the files you modified from Temp into the directory of the local repository to override the old files.

  4. Commit and push.

Tip: Before you make changes on your local repository, you should make sure the local repository has been up to date with the remote repository. If somebody pushed other commits before your push, the error is not avoidable, you need to follow above steps (or similar methods) to solve the error.

In addition, the GitHub Actions board of the GitHub community is used for the discussions and questions about GitHub Actions. If you need help with anything related to workflow configuration, such as syntax, GitHub-hosted runners, or building actions, you can look for an existing topic or start a new one in this board.

About the question you report in this topic, or similar questions, I recommend that you can look for or start the topics in the How to use Git and GitHub board.

@Vidushiii ,

How are things going?
Is my above suggestion helpful to you to solve the problem?
Please try as the steps in the suggestion to see if it works.