Rename the default start (git)

I accidentally renamed the source to master

, and since the default git branch is origin/master

, I need to do this: git pull master master

or git pull master dev

.

How could I rename it so that I can pull the current branch with git pull

?

~$ git remote rename master origin
fatal: remote origin already exists.

      

+3


source to share


1 answer


Go to .git

your repository directory and manually modify your file config

:



[remote "master"]

=> [remote "origin"]

+2


source







All Articles