Intermediate Git & GitHub

Learn to use GitHub on command line. Series II.

Timz Owen
2 min readFeb 11, 2024

This is a continuation of series I which was an introduction to GitHub and version control systems.

This story aims to provide an in-depth introduction to version control systems using git and GitHub. We will use the ⌨️ Command Line Interface (CLI) (i.e. Bash for Windows and Terminal in MacOS & Linux users to perform essential command line techniques.

Version control via the terminal involves using command-line tools to interact with a version control system like Git. Here are some common commands you’ll use:

  1. git init: Initialize a new Git repository in the current directory.
  2. git clone [repository-url]: Clone an existing Git repository from a remote location (like GitHub) to your local machine.
  3. git add [file(s)]: Add changes in the specified file(s) to the staging area in preparation for committing.
  4. git commit -m “[commit message]”: Commit the changes in the staging area with a descriptive message.
  5. git status: View the status of changes in the working directory, staging area, and repository.
  6. git log: View a history of commits in the repository.
  7. git pull: Fetch changes from the remote repository and merge them into the current branch.
  8. git push: Push committed changes from the local repository to the remote repository.
  9. git branch: List existing branches in the repository.
  10. git checkout [branch-name]: Switch to the specified branch.
  11. git merge [branch-name]: Merge changes from the specified branch into the current branch.
  12. git remote -v: View information about the configured remote repositories.

These are just a few basic commands for working with Git in the terminal. There are many more commands and options available for managing branches, resolving conflicts, and performing various tasks in Git.

GitHub Desktop is available for those who would want to learn more from the UI interface.

GitHub intermediate — YouTube

For the experts, series III is coming out soon where we explore more on collaborations and reviews.

--

--

Timz Owen

Full stack SRE | DevOps | Automation Engineer. I Love building Tech communities @Africa