Pushing one file from a cloned repo to a forked repo
Ok so I have a cloned github replica on my local machine and another forked github replica on my github account. I would like to push a file from my cloned local repo to a forked repo. I need to push it in the same location (for example, the file in my local repo is in / folder 1 / folder2 and I have to push it in my forked repo in / folder 1 / folder2). Anyone now have a way to do this?
Thank!
source to share
You can clone your fork and like Justin ᚅᚔᚈᚄᚒᚔ comments , add, commit and push.
If you try to push from the current local clone, its master remote address ("source") refers to the first GitHub repo, not your fork.
But you could do it from the same repo by adding your fork address to your current local clone:
git remote add fork https://github.com/user/myFork
and click there:
git push fork master.
See also " What's the Difference Between Origin and Upstream on github ."
source to share