Question

I need to work on different branches of a project at the same time, so having multiple folders (one for each branch) would be the faster and easier solution.

The problem arises when cloning my own repo: GitHub for Windows will recognize it and automatically move it to the main repository, where i can manage only one branch at a time.

I'm new to GitHub and couldn't find any working solution/workaround for version 1.2.110

Already tried, didn't work:

No correct solution

OTHER TIPS

1 Create a new folder, eg: C:\GitHub\mynewbranch

2 Drag it into GitHub, fill the description fields, uncheck "Push to GitHub" and continue.

3 Open your "Repository settings":

Repository settings

And fill the "Primary remote (origin)" field with your repository url:

Primary remote (origin) field

4 Click "Open in Git Shell" (below "Repository settings") and type this in the command line:

git remote set-url origin git@github.com:<username>/<repository name>.git

5 Then this:

git pull origin <branch name>

6 Switch to the desired branch in GitHub, enjoy :-)


P.S. to update future changes from the master:

git pull origin master
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top