I need to push my changes to a remote repo for the first time
// I added the other repo as a remote
$ git remote add devstage -f <Other-Repo>
// Merged the files from devstage to my local
$ git merge devstage/master -s recursive -X ours
// Executing Everything up-to-date
$ git push devstage HEAD
But the files were not really pushed to the Other-Repo.
Am I missing something?? None of the files in my local are staged. If I open a file stage it and push it to the remote it will be pushed.
A push shouldn't return everything is up-to-date, unless you are in a detached HEAD
mode.
That would mean you git branch doesn't show any active branch (one with a '*
' in front of it).
If that is the case, see "How to fix a Git detached head?".
Also, rather than pushing HEAD, use a branch name.
For your first push:
git push -u devstage master
The -u
establishes a tracking relationship with the upstream branch devstage/master
.
Then a simple git push
will be enough for future pushes.
See why in "Why do I need to explicitly push a new branch?"
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