0

I followed the steps here git-push-existing-repo-to-a-new-and-different-remote-repo-server

But I have modified some file in upstream and I don't have permission to push to it, so I want to push it to a new rep, called origin.

Git tells me that I have unstaged changes, so what should I do next ? enter image description here

Community
  • 1
  • 1
Liu Hao
  • 472
  • 4
  • 24

1 Answers1

0

You have to add all your files and than you can push

# add all your changes
git add .

# commit your changes
git commit -m "Message"

Now you will be able to pull your changes. Than add a new remote and push the merged branch to your second remote

# pull changes into the current branch
git pull origin master

# now push the changes
git push upstream master
CodeWizard
  • 128,036
  • 21
  • 144
  • 167