Before we can start, it is good to have a plan or series of tasks which we need to follow to reach our objective.
This is project management.
Project management helps us plan and execute our tasks that lead to the success of our project. In short, it is the management of:
What is version control?
Version control is the management of the changes and version of documents, computer programs, websites and other collections of information. We are introduced to git, a version control system, where we can keep track of the changes we made to our websites.
Git is a free and open-source distributed version control system. It is very easy to learn and provides good support for all projects regardless of size. It is also available for different Operating Systems (OS).
This is good for beginners as it supports both Command-Line Interface (CLI) and Graphic-User Interface (GUI).
Git Command | Purpose |
---|---|
Initialise | Usually done only once to start the repository |
git clone | Clones/Copies and downloads a repository to your folder.
It is a fast way of making a copy of an existing work. There are two methods of cloning: SSH and HTTPS. We shall use HTTPS |
git init | Initialises a local folder for git |
git pull | Brings down a current version of the repository.
Works only when the repository already exists. Should always be the first command, before you start any work. |
Repeated | |
git add * | Add any files to the staging area.
This will pick up any files which have been updated/added/removeid. |
git status | Shows the files in staging area |
git commit -m
“info on what is done” |
Moves the files from the staging area to the local repo |
git push | Copies the files from the local pc to the remote repo |
Steps to use version control
Step 1:Use git clone to clone the repository to git and then use git init to initialise a local folder for git.
Step 2:Now that the repository is stored in the local drive, we use git pull to bring up the current repository so that we can edit it.
Step 3:To save the changes, use git commit to move the repository from staging area to local repository.
Step 4:To upload the repository onto Github, we use git push to copy the files from local drive to remote repository.