Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Cheat sheet · Foundations

Linux, terminal and Git cheat sheet (Windows)

Free

A quick-revision companion to the Linux, terminal and Git roadmap in its Windows edition: WSL 2 with Ubuntu, the shell, text tools, permissions and processes, Git, GitHub, scripting and servers. Everything after the first chapter runs in your Ubuntu shell.

Curated by Tauseef Fayyaz8 chapters78 concepts168 glossary terms

Chapters

8 chapters · 78 concepts

  1. 1Your machineGetting a Unix shell, a package manager, Git and an editor working, and the words for the parts you are using.8 concepts
  2. 2Shell basicsMoving around, working with files, and how the shell expands patterns, connects commands and finds programs.11 concepts
  3. 3Text toolsViewing, searching, filtering and transforming text, from logs and CSV files to JSON from an API.8 concepts
  4. 4Permissions, processes and packagesWho can read, write and run what, what is running and how to stop it, and how to install tools and language versions cleanly.10 concepts
  5. 5Git fundamentalsHow Git stores work, the daily commands, branching and merging, conflicts, and undoing mistakes safely.12 concepts
    1. 1Commits and snapshotsA commit is a snapshot of the whole project plus a message, author and a pointer to its parent commit, identified by a hash.
    2. 2Working tree, staging area and repositoryChanges move from the working tree (your files) to the staging area with git add, then into history with git commit.
    3. 3git log and git diffgit log shows history, git diff shows changes, git show shows one commit and git blame shows who last changed each line.
    4. 4Commit messagesA short imperative summary of about 50 characters, a blank line, then a body explaining why when needed.
    5. 5.gitignoreA file listing patterns Git should not track, such as dependencies, build output, logs and secrets.
    6. 6BranchesA branch is a movable name pointing at a commit.
    7. 7git stashSaves uncommitted changes on a stack and cleans the working tree, so you can switch tasks and restore them later.
    8. 8MergeCombines another branch into the current one, with a merge commit when histories diverged or a fast-forward when they did not.
    9. 9RebaseReplays your commits on top of another branch, creating new commits with new hashes.
    10. 10Merge conflictsWhen two branches change the same lines, Git stops and marks the file with <<<<<<<, ======= and >>>>>>> sections for you to resolve.
    11. 11Undoing changesrestore discards or unstages changes, commit --amend fixes the last local commit, revert adds a commit that undoes another, and reset moves a branch…
    12. 12git reflogA local log of every position HEAD has been at, including commits no branch points to any more.
    12 in this chapterOpen this chapter
  6. 6GitHub and collaborationRemotes, SSH keys, the pull request workflow, reviews, forks and the GitHub CLI.9 concepts
  7. 7Shell scripting and automationSmall, safe Bash scripts, checked by ShellCheck, run on a schedule with cron, and your own dotfiles.10 concepts
  8. 8SSH, servers and debuggingReaching and securing a Linux server, keeping work alive, reading logs, and checking networks step by step.10 concepts
  9. 9Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.168 terms

About this sheet

Shell, Git, SSH and your dev setup.

Picked from the other libraries by shared topics.

Project structures

See all
Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com