Linking an Existing Project to a Git Remote

If you did not create your project from a Git repository, you can link an existing project to a Git remote (for example, so that you can push and pull your code.

  1. Launch a new session.
  2. Open a terminal.
  3. Enter the following commands:


    git init
    git add * 
    git commit -a -m 'Initial commit' 
    git remote add origin 

    You can run git status after git init to make sure your .gitignore includes a folder for libraries and other non-code artifacts.