Jack BeNimble
Jack BeNimble

Reputation: 36713

How to change remote repository with git

I recently downloaded a git repository from which looks promising as a base for a project I'm starting for a client.

Before making too many changes, I'd like to upload it to a separate repository. From googling, it looks like it may be as simple as this:

git remote set-url origin NEWURL

where NEWURL is the new repository address.

My question: is NEWURL the address that ends in ".git"?

e.g.

 https://[email protected]/myname/my-new-app.git

Also, is it automatically uploaded after that? Or do I have to do any additional commands?

Upvotes: 1

Views: 398

Answers (1)

GoodDeeds
GoodDeeds

Reputation: 8527

Yes, the process to set the remote URL is correct. Additional steps needed:

  1. Create a repository named my-new-app in BitBucket, under your account myname.
  2. Use git push -u origin master to push the code to the BitBucket repository.

Upvotes: 1

Related Questions