I\'m running git 1.8.0 on OS X, and every new git repo seems to have a remote called \"origin\":
$ git init
$ git remote
origin
What\'s odd
I solved my problems this way. First I opened up the config
file using vim with the following command
$ vim .git/config
I modified my file to this below:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[branch "master"]
[remote "origin"]
url = git@192.168.200.79:xxx.git
fetch = +refs/heads/*:refs/remotes/origin_iOS/*
So now, when I give a command git push
it understands, because by default it pushed to origin
and it is set to my origin_iOS
in my server.
You can check your origin config by remote -v
command:
$ git remote -v
origin git@192.168.200.79:xxxx.git (fetch)
origin git@192.168.200.79:xxx.git (push)
If you don't have 'origin'
, you will have troubles with a usual 'git push'
as I did. I had to type 'git push origin_iOS master'
, because I had in my config 'origin_iOS'
Open the .git directory and edit the config file where it says [remote "origin"]
You should be able to remove origin
with
git remote rm origin
Not that you need to, you can just change the origin
with set-url
git remote set-url origin "https://..."