If you did not create your project from a Git repository, you can link an existing
project to a Git remote (for example, git@github.com:username/repo.git
) so that
you can push and pull your code.
-
Launch a new session.
-
Open a terminal.
-
Enter the following commands:
Shell
git init
git add *
git commit -a -m 'Initial commit'
git remote add origin git@github.com:username/repo.git
You can run git status
after git init
to make sure
your .gitignore
includes a folder for libraries and other non-code
artifacts.