<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CI/CD on CENG Lab -- Ryo Ueda</title><link>https://ofurotime.ca/knowledge-base/cicd/</link><description>Recent content in CI/CD on CENG Lab -- Ryo Ueda</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 10 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ofurotime.ca/knowledge-base/cicd/index.xml" rel="self" type="application/rss+xml"/><item><title>Git Cheatsheet</title><link>https://ofurotime.ca/knowledge-base/cicd/git-cheatsheet/</link><pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate><guid>https://ofurotime.ca/knowledge-base/cicd/git-cheatsheet/</guid><description>&lt;p&gt;A quick reference for the Git commands used most often in day-to-day development.&lt;/p&gt;
&lt;h2 id="cloning-and-branches" class="relative group"&gt;Cloning and branches &lt;span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"&gt;&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#cloning-and-branches" aria-label="Anchor"&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git clone &amp;lt;URL&amp;gt;&lt;/code&gt; — clone a repository to your local workspace&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git checkout &amp;lt;branch&amp;gt;&lt;/code&gt; — switch to an existing branch&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git checkout -b &amp;lt;branch&amp;gt;&lt;/code&gt; — create a new branch and switch to it&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git branch&lt;/code&gt; — list local branches&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git branch -vv&lt;/code&gt; — list local branches with their last commit and the upstream (remote-tracking) branch they&amp;rsquo;re tracking, e.g. &lt;code&gt;[origin/main: ahead 2]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="staging-and-unstaging" class="relative group"&gt;Staging and unstaging &lt;span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"&gt;&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#staging-and-unstaging" aria-label="Anchor"&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git add . / &amp;lt;file&amp;gt;&lt;/code&gt; — stage changes in a file (or all changes with &lt;code&gt;.&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git reset&lt;/code&gt; — unstage all changes, keeping the changes in your working directory intact (equivalent to &lt;code&gt;git reset --mixed HEAD&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git restore &amp;lt;file&amp;gt;&lt;/code&gt; — restore a file in the working tree from the &lt;strong&gt;index&lt;/strong&gt; (staging area), discarding unstaged edits. To also discard staged changes and fully revert to the last commit, use &lt;code&gt;git restore --staged &amp;lt;file&amp;gt;&lt;/code&gt; first (or &lt;code&gt;git restore --source=HEAD --staged --worktree &amp;lt;file&amp;gt;&lt;/code&gt; to do both in one step)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="inspecting-changes" class="relative group"&gt;Inspecting changes &lt;span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"&gt;&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#inspecting-changes" aria-label="Anchor"&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git diff&lt;/code&gt; — show unstaged changes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git diff --staged&lt;/code&gt; — show staged changes (equivalent to &lt;code&gt;git diff --cached&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git status&lt;/code&gt; — show both staged and unstaged changes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="committing-and-remotes" class="relative group"&gt;Committing and remotes &lt;span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"&gt;&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#committing-and-remotes" aria-label="Anchor"&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git commit -m &amp;quot;comment&amp;quot;&lt;/code&gt; — save staged changes to the current branch&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git remote -v&lt;/code&gt; — list remote repositories and their fetch/push URLs&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git remote add origin &amp;lt;URL&amp;gt;&lt;/code&gt; — register a remote repository under the name &amp;ldquo;origin&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git remote set-url origin &amp;lt;URL&amp;gt;&lt;/code&gt; — change the URL associated with the &amp;ldquo;origin&amp;rdquo; remote&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git push -u origin &amp;lt;local branch&amp;gt;:&amp;lt;remote branch&amp;gt;&lt;/code&gt; — push a branch to the remote and set it as the upstream for future &lt;code&gt;git push&lt;/code&gt;/&lt;code&gt;git pull&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="stash" class="relative group"&gt;Stash &lt;span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"&gt;&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#stash" aria-label="Anchor"&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git stash&lt;/code&gt; — save local changes and remove them from the working tree&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git stash apply&lt;/code&gt; — reapply the most recently stashed changes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git stash clear&lt;/code&gt; — remove all stashed changes&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="merge" class="relative group"&gt;Merge &lt;span class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100"&gt;&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700" style="text-decoration-line: none !important;" href="#merge" aria-label="Anchor"&gt;#&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git merge &amp;lt;branch&amp;gt;&lt;/code&gt; — merge the given branch into the current branch&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git merge --abort&lt;/code&gt; — cancel an in-progress merge and return to the pre-merge state&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>