The Selected Folder Is Not Within The Hierarchy Of GIT Repository

How to resolve error " The selected folder is not within the hierarchy of GIT repository" ?

  1. Copy to GIT allows to copy the current project to an existing repository on your local machine. Check the link for Copying A Project To Git .
  2. Make sure that the selected folder is the repository which is cloned on the local machine.
  3. Make sure that the selected folder has .git subdirectory in it. This subdirectory contains necessary GIT metadata.
  4. If selecting the correct repository and it throws stated error then try below steps,
  • First take a backup of current repository folder.
  • Again try to clone the repository to the local machine. Refer Cloning A Remote Git Repository .
  • Try to copy the project to this repository and check the behavior.