5

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.

special0ne
  • 5,363
  • 14
  • 62
  • 103
  • I couldn't reproduce the behaviour. The files are pushed to the other repo with your commands. – lukes Jan 18 '14 at 08:03

1 Answers1

4

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?"

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283