Codecademy / practice-rebase-off-platform-project

3 stars 3.48k forks source link

Unable to checkout branches #7

Open DKB08 opened 1 year ago

DKB08 commented 1 year ago

When I fork this and clone it locally I am unable to checkout the other branches. When I clone it directly from here without forking, I am able to checkout the other branches.

dobell733 commented 1 year ago

I had the same issue as well

regexrekt commented 1 year ago

The following steps worked for me:

From Codecademy's repo page

  1. Select fork
  2. Uncheck the option to 'copy the main branch only' before creating the fork

From terminal

  1. cd into local project path
  2. create clone from the forked repo

    git clone https://github.com/yourUsername/practice-rebase-off-platform-project.git project_name

  3. cd into your cloned repo (you can then use the -a flag optionally to view all branches)

    git branch -a

  4. checkout the main, part_1_Monday and part_2_Monday branches

    git checkout main git checkout part_1_Monday git checkout part_2_Monday git branch

That said, I am not sure if this is the correct approach altogether. Any advice/feedback on this would be much appreciated!

DKB08 commented 1 year ago

Thanks, @regexrekt !

evascroll commented 1 year ago

The following steps worked for me:

From Codecademy's repo page

  1. Select fork
  2. Uncheck the option to 'copy the main branch only' before creating the fork

From terminal

  1. cd into local project path
  2. create clone from the forked repo

git clone https://github.com/yourUsername/practice-rebase-off-platform-project.git project_name

  1. cd into your cloned repo (you can then use the -a flag optionally to view all branches)

git branch -a

  1. checkout the main, part_1_Monday and part_2_Monday branches

git checkout main git checkout part_1_Monday git checkout part_2_Monday git branch

That said, I am not sure if this is the correct approach altogether. Any advice/feedback on this would be much appreciated!

thanks! it work for me! just in the select fork dropdown select the create a new fork option there uncheck the option "copy the main branch only"

Yonahv commented 1 year ago

Yup. Same issue. Codecademy did not specify to uncheck the 'copy the main branch only' in the tutorial. Uncheck it and your good to go.