Domanda

There are a lot of Questions on here and the web about Multiple "GitHub" accounts...

But I have an issue where I need to use two Git solutions;

  • I need to be working on a GitHub account, already setup and working.
  • We are migrating across to Atlassian Stash, another Git provider, so for the time being I need to work on both.

Forgive my ignorance as a WebDev, I try to stay away from system settings and command prompt.

But as I understand it, "Git" not "GitHub" is managed locally with global credentials and configurations.

So running these commands will bump me off of GitHub; git config --global user.name "Will Hancock" git config --global user.email "will.hancock@webtekkers.com"

Here's an Idea... If I used the same email and same password on both would that work?!? Like ONE Git credentials, then the repo is configured on a per repo basis?

Have I understood this correctly?!?

I am reluctant to "mess around" and have a play, as these are not my repo's and I need to be able to work today.

È stato utile?

Soluzione

It sounds like you want to change the git repository remote connections. When cloning on github to your local machine the remote connection in your local git-repo is the "origin" remote. You need to point that to Stash instead of GitHub. Other than that you should be fine.

git remote set-url origin "git://your.stash.repo.domain/yourproject.git"

Help on git remote: http://gitref.org/remotes/#remote

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top