1

I have two repositories: One in github and another on Bitbucket.
I'm confused. Using git Bash how may I select which remote repository I want to work with ? Is there an easy way to switch between them ? ( I already have my project on remote server).

Update

I could 'add' two repositories with the following command:

git add remote Repository_URL  

Now if I do

git remote -v  

It shows me both repositories and its URLs.

Now I need to know how to select one of them to work with.

PlayHardGoPro
  • 2,791
  • 10
  • 51
  • 90

1 Answers1

2

You specify the remote name in a specific git command. For example, if they were called github and bitbucket:

git pull github master
git pull bitbucket master

git fetch bitbucket

git push github master

etc.

You can also specify a per-branch default remote in your config file if you like.

Community
  • 1
  • 1
Aaron Brager
  • 65,323
  • 19
  • 161
  • 287