CS Basics: CLI - GitHub's Other Commands

A practical rundown of a few more useful Git commands you'll encounter when managing repositories and collaborating with others.

Originally written by Carl Mills · December 31, 2017

Expanding Beyond the Basics

The Git Command Line Interface (CLI) goes beyond commit and push. Below are several additional commands that streamline collaboration, configuration, and repository navigation.

Additional Git Commands

git config

Short for "configure." Used when setting up Git for the first time. It lets you set, query, or modify configuration options such as username, email, or preferences.

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

git help

Displays a summary of common Git commands. You can also use it with a specific command for detailed help.

git help
git help push

git branch

Creates or lists branches. Each branch represents an independent line of development.

git branch figs   # create a new branch called "figs"
git branch        # list all branches

git checkout

Navigates between branches or specific commits. You can move to another branch or restore a version of a file.

git checkout master
git checkout figs

git merge

Combines changes from one branch into another - usually merging a feature branch back into the master branch.

git merge figs

git pull

Downloads the latest version of a repository from GitHub to your local machine - essentially syncing your branch with the remote.

git pull origin master

Collaboration in Practice

These commands are foundational for team-based development. While you might not use them daily as a solo developer, familiarity is essential when working on collaborative projects.

Next up: we'll shift gears into CSS - starting with an overview before diving into methodologies and preprocessors.

Next in the Series

In the next post, we'll begin exploring CSS - structure, syntax, and modern approaches to styling web interfaces.

Continue to CSS Overview →