Skip to content
Advertisement

Why not able to push the new added files on remote repository?

I am new to Git. I have recently created a repository and uploaded a folder in it using the following sequence of commands:

JavaScript

This was my first time when I uploaded the files to this repository. Now I am trying to upload more files to this repository using the following commands:

JavaScript

But, I am getting the following information:

JavaScript

Why is it so? How can I upload more files on my repository using git in the command line?
Please resolve it.
Thank you!

Advertisement

Answer

I am not sure what is causing you’re specific problem here, but i think you are not following the correct workflow. These are the steps you should follow:

  1. Type git branch and ensure that you are on the main branch (if not do git checkout main)

  2. Then do:

    JavaScript

Follow this flow everytime you want to push to this branch and you should have no issues.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement