![]() ![]() To clone/download the repository using an SSH key, including a certificate issued by your organization’s SSH certificate authority, click Use SSH, then click. To clone a repository using Command-Line you have to first install git version control then only you will be able to clone the repo.ġ.On Github, navigate to the repository page which you want to clone/download.Ģ.Above the list of files, you will see a green button click Code.ģ.To clone the repository using HTTPS, under “Clone with HTTPS”, click. For beginners, I would suggest you use GitHub Desktop as this method is simple to use and you won’t get stuck in it. There are 2 ways how you could do this first one is using Command-line and the other one is using the command-line. To get the code on your local there is no direct method you have to clone the repository to your local machine. From small websites to big complex software, everything is here. I could make a pull request for this solution and figure out if there are improvements that can be made during the review of it.GitHub has one of the largest collection of repositories in the world. Perhaps someone knows a more efficient way to check this though. This allows checking if the folder is empty or not, but may be less efficient for folders with a lot of files, as a repository folder very well may. However, to do so, I make use of fs.readDir, which retrieves a list of file names in the folder. I have already tried and tested a solution for this and it seems to work as intended. The second option should cover each scenario, however I did have one concern. The first option is simpler but still leaves a scenario with this issue (effectively behaving as it did before my change). This would allow to warn the user via the red banner error display when a folder containing files exists at the path while eliminating both situations where an error could display for an empty folder being selected. We could update the validation function to check if a folder is empty, and if it is, accept it as okay for cloning.This would cause it to re-validate, and since the validation function has not changed it would generate the error like what has been reported. Though, the issue as it has been reported would still occur in situations like clicking the destination path input (or typing in it) after creating a folder outside of Desktop. fatal: destination path '' already exists and is not an empty directory. However, if it has files, an pop-up error will show up. If this is done, then if a user enters a destination path that is not an existing folder, but then creates the folder at the path (empty or not), there will be no red banner notification to let them know that it already exists. We could go back and make it so that although it will remove the DestinationExistsError as it currently does (when the destination path is still it's initial value and no clone url is entered/selected) but not re-validate the path on focus.To that end it feels like more of an enhancement. On the other hand, the way it's currently set up does block a potential workflow that I believe it should probably be supporting. On one hand, I would say that it is behaving exactly as it is currently set up to. I'm not sure if it would necessarily be a bug. I would be happy to make some changes to accommodate situations like this. I believe this is something we can update to assist with this work flow. It seems the issue here is that the validation function is only aware if a folder exists. Previously since it would not re-validate on focus, the user could clone without Desktop realizing the folder is already there. However, now that the path is re-validated on focus, it catches the folder having been created when switching back to the window. This would have given it a chance to validate and detect the folder, causing the error to show. Previous to the changes, we would have also run into this situation if one created the folder and then typed the folder name into the destination path. While my changes did not change how the validation function works, it did change when it validates. If the user deletes the folder and lets the dialog create the folder for them, it should work normally. If a user creates a folder before cloning, the validation function will check and see that the folder exists and show an error that the destination already exists. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |