Skip to content

Git Usage

MorrisYLin edited this page Aug 31, 2025 · 5 revisions

Guide

Git is the gold standard for version control, with everyone from giant enterprises to solo developers using it.
It can be tricky to understand though, so please look through this guide to get a feel for it.

Commands to know

These commands are all that you can expect to use in the Electrical team. You may see more advanced commands if you work with git for larger repos.

  • git status: Displays the current state of your working directory and staging area.
  • git clone <repo-url.git>: Copies a remote repository to your computer.
  • git add <file(s), dir>: Stages changes to be committed.
  • git rm <files(s), dir>: Removes files from tracking.
  • git commit -m "message": Saves staged changes to the local repository. Use -m to avoid having to use vim.
  • git push: Uploads local commits to a remote repository.
  • git pull: Fetches and merges changes from a remote repository into your local branch.
  • git switch <branch-name>: Changes branches.

Clone this wiki locally