I'm following this SO article to migrate a local branch in one repo to a local branch in a new repo (we migrated from github to gitlab).
How to merge branches in 2 different repositories?
I encountered a problem along the way. I added a remote pointing to the old github local repo:
git remote add github-local ~/myprojectdir/src/.git When I run git branch -r in the newly cloned gitlab repo, I expected to see branches from both github-local (the remote I just added above), and from origin. But I only see branches from origin.
The next step in the SO article above is to create a branch and track github-local/mybranch:
git checkout -b mybranch --track github-local/mybranch I assume I can't do that if I don't see it in the list of remotes when I run git branch -r?