Ok, so I have a cloned github repo on my local machine, and another forked github repo in my github account.
I would like to push a file from my cloned local repo to my forked repo. I need to push it in the same location (e.g. the file in my local repo is in /folder1/folder2 and I have to push it in my forked repo in /folder1/folder2). Does anyone now a way to do this?
Thanks!
You can clone your fork, and as Justin ᚅᚔᚈᚄᚒᚔ comments, add, commit and push.
If you try to push from your current local clone, its main remote address (the ‘origin’) refers to the first GitHub repo, and not your fork.
But you could do it from the same repo, by adding to your current local clone the address of your fork:
, and push there:
See also “What is the difference between origin and upstream in github“.