How To Change Repo For Pushing Projects?

Check the current remote:

`git remote -v`

Remove the existing remote:

`git remote remove origin`

Add the new repository URL:

`git remote add origin `

Verify the updated remote:

`git remote -v`

Push the branch to the new repo:

`git push -u origin `

If needed, force push:

`git push -u origin –force`

If you only want to change the remote URL:

`git remote set-url origin `

Confirm the branch name before pushing:

`git branch`

Push all branches if required:

`git push –all origin`

Push tags if required:

`git push –tags origin`

Suggested for You

Trending Today