Convert a local development folder into a Git repository
Version Control System such as Git is not required in software development. Therefore, a local folder can later be converted into a Git repository, a process in which a .git
folder (likely hidden) is created in the directory. This can be done without the terminal (CMD) by using the Github Desktop app.
After setting up the Github Desktop, use the Add Existing Repository…
menu and select a local path. If the directory does not appear to be a Git repository, the app will present an option to create a repository
in that folder.
Once you complete the ‘Create a New Repository’ process, Github Desktop will create an Initial commit
accordingly. For example, I have checked the ‘Initialize this repository with a README’ and selected the MIT License. Therefore, the initial commit includes a README.md
and a LICENSE
file.
Note that publishing to GitHub (the hosting service) is an option. Since the folder is now a local Git repository, one can use the CLI, other GUI clients (e.g. GitKraken, Sourcetree), or even the GitHub Desktop app to version control. It can be published to any Git hosting service, such as GitLab and BitBucket.