6 Working with a Remote
For now, you only have a local project. This step will explain how to push your project to a remote repository on GitHub.
6.1 Create an empty repository
- Go to github.com
- Create a new public repository named username.github.io, where username is your username
- Example: my username is dhmmasson, my repository is dhmmasson.github.io
- The repository should be public
- The repository should be empty (do not initialize this repository)
- Copy the resulting url:
- For the username dhmmasson, the url looks like that: https://github.com/dhmmasson/dhmmasson.github.io.git
6.2 Git Push
- Go back to smartgit, in your local repository.
- In the menu Remote > Add
6.3 Git Token
If you haven’t already, you need to create a token to push your project to github. Create a token
6.4 Cloning
- Commit and push all your change.
- If SmartGit asks for the login/password, use your access token (previous step) instead of your password.
- Click
save credentialsto make sure you do not have to worry about it anymore!
- Visit the repository on github (https://github.com/
/ .github.io) - Delete your local repository
- Clone the project back from github
7 Finishing up
7.1 README
All repository should contains a README file. A README is a text file that introduces and explains a project. It contains information that is commonly required to understand what the project is about. It should explain how to install, use or contribute to your project.
It should be the first file you create on a project as it will give you the habit of documenting your projects. READMEs are usually written in a format called markdown that allows you to easily write formatted text with a text editor.
Today, we will use it to mark what we have to do for this activity.
# My page
This is my home pageCreate the file Readme with .md extension.