Set up the environment for GitHub workflow (Images are linked with the required sites. Just right click on them and choose open link in new tab
to visit)
Step1: Install one of the editors given below. If you have already installed one skip to the next step.
Atom | VS Code |
---|---|
Step2: Add your editor to the Environment Variables of your PC so you can open it anywhere through the Command Line Interface(CLI) which we are going to install next.
This is the tool we are going to use to interact with almost everything related to this platform. Keep the default configurations as they are at the installation process. Anyway you will need to choose the editor you installed previously at one point in the installtion.
Now you can open the Git Bash
the CLI for handling GitHub workflow, inside any directory(folder) in your PC by right clicking on a free area and selecting the Git Bash Here
. As shown in the figure.
You can execute commands by typing the required git command
in front of the $
sign(active line) in the Bash.
Open the Git Bash on your desktop. Execute following commands through it by typing them in the bash.
git config --global user.name "Replace this with Your Name"
git config --global user.email "Replace this with the email you used to create the GitHub account"
//for atom users
git config --global core.editor atom
//for VS code users
git config --global core.editor code
The web page you are currently in is called a "Repository"; in short a "repo". This is where all the files related to a particular project are located. Repository's name is the phrase after the forward slash of this organization's name. ENTC18/getting-started
as you can see this repo's name is getting-started
. This name is unique and two repos can not have the same name.
To work on a project you first need to get a copy of the required repository to your local machine. In GitHub workflow this process is known as Cloning a repository
.
- Navigate to anywhere you wish to have the copy of this repository on your local machine.
- Open the
Git Bash
there as mentioned previously. - Type the following command.
// URL at the third position can be found as depicted in the following figure
git clone https://github.com/ENTC18/getting-started.git
Once the cloning process is completed you will have an exact copy of this repository as a folder, named getting-started
.
- Now close the
Git Bash
CLI you opened previously. - Then open the newly created folder and you can see what is in there. All the files related to the project!
- Open the
Git Bash
there(inside thegetting-started
folder) and do not close it until you finish all the work. - Type the command
git pull
in the bash. This is a MUST! and Need an Internet Connection - If your local copy is up to dated with the original repo in the GitHub. You will receive a message saying "Already up to date."; Otherwise the necessary changes will be automatically downloaded and merged with your existing files.
- Only Now, you may change the files. You can do anything you wish with them. File Create, Read, Update and Delete.
- Once you have done the necessary changes you need to upload them to the main repository. This is a MUST! and Need an Internet Connection
- Type following commands in the given order in the bash.
// 1. The dot in the end after a space in the second command is essential
git pull
git add .
git commit -m "your message indicating the changes you made."
git push origin main
Every time when you need to do a change to a repository. Simply follow the steps starting from 3. That's it!
Upgrading into ‘GitHub Pro’ and Activating the ‘GitHub Student Developer Pack’ using UOM email address
Through applying for the “GitHub Student Benefits” using your institution email address, you can upgrade your GitHub Free account into GitHub Pro and at the same time, you can activate the GitHub Student Developer Pack which includes free access to the best developer tools in one place. Some of them are given below.
- Free GitHub Pro while you are a student.
- Free access to 25+ Microsoft Azure cloud services plus $100 in Azure credit.
- Professional desktop IDEs: IntelliJ IDEA, PyCharm, and more.
- Unity Student Plan free while you are a student.
- Free 30-day “One Month” subscription
- And many more…
Click here to view the instructions.😉