Convert a local development folder into a Git repository

Use the GitHub Desktop app’s ‘create repository here’ feature

Hyunbin
2 min readJun 14, 2022

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.

When adding a repository to the Github Desktop, selecting a non-Git repository will prompt a [create a repository] button

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.

Set options and create a new repository (name, description, README, gitignore, license)

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.

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.

Publishing the repository to GitHub can be done with the [Publish repository] button

--

--

Hyunbin

Node.js and web developer using TypeScript. Undergraduate in Seoul National University.