read

In certain cases, more than 1 person might be assigned to pull and update a local repository. The below is a simple way for anyone to use their own git login to pull from the repository by setting up additional remotes:

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote “origin”]
fetch = +refs/heads/:refs/remotes/origin/
url = https://username1@bitbucket.org/accountname/testrepo.git
[remote “origin-a”]
fetch = +refs/heads/:refs/remotes/origin/
url = https://username2@bitbucket.org/accountname/testrepo.git
[branch “master”]
remote = origin
merge = refs/heads/master

You would then use git pull origin master to use the username1 account to pull from git and git pull origin-a master for the username2 account

updated.

Blog Logo

Alvin Zhang

I started writing code in 1998 when I tried to make new in-game units for an amazing RTS game called Total annihilation. Today I run Red Airship and am on a quest to cook good paella.


Published

Image

1998 Nineteen-Ninety-Eight

Thoughts, stories and ideas.

Back to Overview