You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting up github and bitbucket on the same computer (Windows)
Guide for Windows
mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.
Github will be the main account and bitbucket the secondary.
This must be done once for every bitbucket (or secondary) repo, it is not
needed for github (or primary) repos because the global is used in that scenario.
There may be a cleaner way to do this but right now it works okay.
Just to be clear you do not need to change these values back afterwards because the
global values (which apply to all future repos created) will be set.
Use case: Repo already exists on secondary remote repo (bitbucket)
So you have a repository that already exists and you want to want to clone it
but also you want to make sure when you push it, the correct user, the bitbucket
user pushes. Let's say the repo is called booker.
Remember, because we are using the secondary account, we have to over-ride the global configuration of username and email. The git clone command is using the ssh keyfile you set up earlier and is doing the transfer over ssh.
Now, change into the cloned directory and modify one of the files. Use git status to check the current state, then use git add 'filename' and git commit -m "commit message".
Finally push your changes using git push origin master.