What does "remote" mean here? What does "No remote for the current branch" mean?
I am trying to merge my changes to my code in Git and I get this message.
A merge between two local branches of your local repo should not require any "remote" (which is a reference to an upstream repo URL)
But: As mentioned in git merge man page, section CONFIGURATION:
If
mergeis called without any commit argument, merge the upstream branches configured for the current branch by using their last observed values stored in their remote-tracking branches.The values of the
branch.<current branch>.mergethat name the branches at the remote named bybranch.<current branch>.remoteare consulted, and then they are mapped viaremote.<remote>.fetchto their corresponding remote-tracking branches, and the tips of these tracking branches are merged.
So, if you want to merge another local branch into your current checked out branch, don't just type git merge (which would trigger the fatal: No remote for the current branch. error message)
Type:
git merge anotherBranch
You will need to add a remote later if you want to push to an upstream repo.
See more with: "Definition of “downstream” and “upstream”".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With