Simple guide using Git bash:
- Navigate to your workspace using the 'cd' command
- (Creates an empty repository)
Code:
git remote add origin <SSH clone URL>
(Adds the remote repository as 'origin.' <SSH clone URL> is the URL given to you by GitHub, resembilng git@github.com:Username/RepositoryName.git- (Adds current files to the repository)
Code:
git commit -am 'Initial commit'
(Creates a commit with added files)
Code:
git push origin master
(Pushes local commits to the remote repository)
It is recommended that you have a decent .gitignore file in the root directory of your workspace, in order to keep unnecessary files out of the repository. A good example of a .gitignore file can be found
here.