Skip to main content\(\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\bivec}[1]{\overset{\curvearrowleft}{#1}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 8.1 Terminal Cheat Sheet
Note ID: 202604120002 |
Tags: git bash terminal
Subsection 8.1.1 Local Git Reset
Multiline version (safter, less likely to accidentally earase local changes):
git fetch origin
git checkout main # or whatever branch you're using
git reset --hard origin/main
git clean -fd # removes untracked files & folders
One-liner (β οΈ use with caution!):
git fetch origin && git reset --hard origin/main && git clean -fd
Subsection 8.1.2 Update pip requirements.txt
pip install -r requirements.txt --upgrade
pip freeze > requirements.txt