Pushing my commits aren't going to my forked repo #23182
-
I am having difficulties pushing changes I’ve made to a forked a repo I made. I wanted to make some changes to the README.md file for my local .NET user group GitHub repo. I forked the repo into a copy of the original under my GitHub account. Since I’m new at this I looked at Kent Dodds tutorial) on how to configure things so my local repo would fetch from the original repo, but I had thought push to my forked repo. Or at least that’s what I thought. But I’ve made some mistake. After I made edits and committed them locally, I tried to push my changes to my forked repo. However, this is the error I got:
So next I entered checked my remotes and here’s what I got:
I want to fetch/pull from upstream, but push to my origin. What have I done wrong and how do I fix it, please? (I’m using posh-git) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
If you want
Otherwise you can set the upstream branch, but after that you’d need to explicitly pull from
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately, the
I’ll try setting the upstream branch. |
Beta Was this translation helpful? Give feedback.
-
@airtower-luna, I had to change I was able to push my changes to my forked repo. Then I created a PR for the original author to consider. Thank you for your help. |
Beta Was this translation helpful? Give feedback.
If you want
git pull
without arguments to keep pulling fromupstream
you’ll need to explicitlypush
to yourorigin
:Otherwise you can set the upstream branch, but after that you’d need to explicitly pull from
upstream
: