Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DianaEromosele/fa228f6f6099a8996d3cb891109ab975 to your computer and use it in GitHub Desktop.
Save DianaEromosele/fa228f6f6099a8996d3cb891109ab975 to your computer and use it in GitHub Desktop.
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@PrernaWeb
Copy link

I left off the last 2 commands, still worked.

@DLesmes
Copy link

DLesmes commented Nov 19, 2021

3 years later, thnx x 1k

@cgrant417
Copy link

After doing this, github desktop wants me to publish the local copy!?!
If I use
$ git remote set-url origin <remote_url>
I don't run into this problem. They are properly synced.

@Liran-tal
Copy link

Thank you. As a noob, it is very helpful to see the simple way things get done.

@mclements
Copy link

After GitHub changed the default branch name from master to main, I used:

$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config main.remote origin
$ git config main.merge refs/heads/main

@coolprogrammerarpit007
Copy link

ThankYou So Much. This is so helpful

@MatrasTomek
Copy link

Thank you! Great help.

@ruicruzeiro
Copy link

Beautiful! Thank you so much!

@MaloJay
Copy link

MaloJay commented Jan 14, 2023

thanks, this helped alot..

@rcapdepaula
Copy link

thanks!

@ngud-0119
Copy link

ngud-0119 commented Mar 24, 2023

Awesome. Thank you.

@w3villa-harsh-yadav
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment