How to push code on github repository folder?

86 Views Asked by At

At first I have create a repo on GitHub. Then I have created a folder on that repo. Now my Question is that how to push code on that folder from my pc .

i have tryed this command to connect this folder from my pc GitBash by this command:

git remote add origin { github url of my repo}/tree/main/WEEK%202/module%20-%206.5.git

i have chacked this command : git remote -v

origin { github url of my repo}tree/main/WEEK%202/module%20-%206.5.git (fetch) origin { github url of my repo} /tree/main/WEEK%202/module%20-%206.5.git (push)

when ever i give git push command it says :

git push origin main```
`fatal: repository '{ github url of my repo} tree/main/WEEK%202/module%20-%206.5.git/' not found`
1

There are 1 best solutions below

1
Raman On

the error message of git push command Showing that URL of your repository is not correct . make sure you copy correct url and then try it again . If still facing and issue let me know with more information

and "git remote add origin "

to add url in this command refer screenshotenter image description here