Deploy the project to GitHub
The initial commit.
As I have mentioned before, this step is not mandatory. But I would advise to use GitHub, for versioning, keeping track of your history and setting up policies.
It is possible to deploy to GitHub in two different methods (there is more, but we focus on two for now):
- Using Git
- Using GitHub desktop
You just need to use one of these two, not both!
If you use the terminal, you are most likely a seasoned developer already and you know your way around the code. In any case, to deploy using the terminal, follow the following steps:
1. Create a new repository on GitHub
- Add a Repository name
- Define if it is public or private
- Do not add README, .gitignore and License
- Select 'Create repository'
echo "# <YOUR_PROJECT_NAME>" >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add origin <YOUR_URL> git push -u origin main
- In this example, I use Visual Studio Code. Any is fine, as long as you can open the terminal
- Open the Terminal with one of these two:
- CTRL + `
- Selecting Terminal > New terminal
- After you have copied the code and have the terminal open, it is time to run the code for the repository generation.
- Paste the code into the terminal (Shift + Insert)
- Run the code using enter
The second method you can use to deploy your project is through the use of GitHub desktop.
Download GitHub desktop from https://desktop.github.com/
When you have GitHub opened, select File > New repository
- Hotkey is CTRL + N
- Enter the required information in the opened page
- Select create repository
After you have created the repository through GitHub desktop, you still need to Publish the repository.
- Click on Publish Repository in GitHub Desktop