Closed
Description
Ran into this issue when trying to teach a new Git user how to clone a repository. The user tried to select an existing, empty folder for the Target Directory, and Git GUI complained. While technically the UI isn't wrong, the process is unintuitive.
Setup
- git 1.9.5.msysgit.1
- git-gui 0.19.GITGUI
- Windows 7 Enterprise, SP1, 64-bit
- Default install options.
Steps to Reproduce
- Create a new folder called "Git Repositories".
- Start Git GUI.
- Select Clone Existing Repository.
- Set the source location to a working, accessible git repository.
- For Target Directory, click Browse, navigate to and select "Git Repositories", then click OK.
- Click Clone.
Expected:
- A new folder would be created in "Git Repositories" that matched the name of the Source Location repository.
Actual:
- Error window appears with the message "Location already exists."
Failed Workaround:
The user attempted the following workaround, which failed with the same error:
- For Target Directory, click Browse, navigate to and select "Git Repositories".
- Click New Folder.
- Give the new folder a name.
- Click OK.
- Click Clone.
Workaround:
- For Target Directory, click Browse, navigate to and select "Git Repositories", then click OK.
- In Target Directory, append "/repository_name", where "repository_name" is the folder you want to create.
- Click Clone.
Recommended Solution
If the path supplied in Target Directory exists and is a folder, then Git GUI should either:
- Check if it's an empty folder, and if so, clone there
- Clone to a subfolder using the source location name (my preference)