DEV Community

Discussion on: How to push a project to GitHub

Collapse
 
ac000 profile image
Andrew Clayton

Before you can 'git add' you'll need to initialise the repository with 'git init'

Also, before you can push your repository to GitHub or anywhere else, you'll need to add it as a remote.

Push your code to Git. This means you are pushing to a branch named 'master' on a remote repository on Github

I wouldn't say 'Push your code to Git', that doesn't really make sense. You push some branch/tag/refspec to another repository, it could be a repository local to your machine, or remote, like GitHub, GitLab etc or just your own hosted repository perhaps using git-daemon.

Collapse
 
geektutor profile image
Sodiq Akinjobi

Thank you very much, Andrew. I have corrected the article to reflect this. Compliments of the season to you