0

how do i import a new branch from github using git? I tried git clone https:blablabla.com/blabla.git, but it did give me an error like this: fatal: destination path 'FolderName' already exists and is not an empty directory. Can anyone help, please?

Jamsy
  • 1
  • 1
  • `git clone` doesn't "import" (well, fetch) a branch — it clones (copies locally) the entire remote repository. Do you have a local repository already and want to fetch another branch? Or do you want to clone to a new empty directory? – phd Feb 17 '21 at 23:04
  • Yes, I do have a local repo with the main branch, but not with the one I want to code on. @phd – Jamsy Feb 17 '21 at 23:07
  • https://stackoverflow.com/search?q=%5Bgit%5D+fetch+branch – phd Feb 17 '21 at 23:10
  • `git fetch origin && git checkout new_branch_name` – phd Feb 17 '21 at 23:10

0 Answers0