Adding an existing project to GitHub using the command line Create a new repository on GitHub. In Terminal, change the current working directory to your local project. Initialize the local directory as a Git repository. git init