I currently have a repo, but I want to temporarily use another repo to push the changes to and then when I choose to, change back to the other repo and push to that one again (this is due to reasons of access to the main repo).
So I'm wondering, if I want to change the repo the pushes go to, is all I have to do is change the origin in my git config file, such as:
[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    url = git@bitbucket.org:myname/my-repo.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
Do I just change this line:
url = git@bitbucket.org:myname/my-repo.git
...to the new value and then back again to go back to the main repo? ...or is there something else to do and if so, what!?
 
     
    