<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Git Getting Started!</title><link>https://oripekelman.github.io/git-training/</link><description>Recent content on Git Getting Started!</description><generator>Hugo</generator><language>en</language><atom:link href="https://oripekelman.github.io/git-training/index.xml" rel="self" type="application/rss+xml"/><item><title>What is Git?</title><link>https://oripekelman.github.io/git-training/docs/what-is-git/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/what-is-git/</guid><description>&lt;h1 id="what-is-git"&gt;
 What is Git?
 &lt;a class="anchor" href="#what-is-git"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Hello and welcome. This course begins with a very simple observation: if you want to have a job in IT, no matter which one, knowing Git is not optional; Git is used everywhere.&lt;/p&gt;
&lt;p&gt;First, a word on the subject, then a little explanation on the &amp;ldquo;why&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;At the highest level, we can say that Git is a software that allows saving code. This is the absolute standard in the field: the one and only way to do your ctrl-s (or cmd-s).&lt;/p&gt;</description></item><item><title>Git and its ecosystem</title><link>https://oripekelman.github.io/git-training/docs/git-ecosystem/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-ecosystem/</guid><description>&lt;h1 id="git-and-its-ecosystem"&gt;
 Git and its ecosystem
 &lt;a class="anchor" href="#git-and-its-ecosystem"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;To be able to do all these wonders, Git had to reach a certain level of complexity. One could spend years learning and mastering its idiosyncrasies. Git has many layers and there are many ways to use it: the majority of its users will use the command line (and we will encourage you in this way), but others use it with the many graphical software (GUI, for Graphical User Interface) that exist, through integrated development environments (IDEs), or even simply by using their web browser through one of the many source code hosting systems on the web (first GitHub, the major reference we are going to talk about again, but also GitLab, Bitbucket, Codeberg or a Forgejo you host yourself).&lt;/p&gt;</description></item><item><title>First steps, first Git commands</title><link>https://oripekelman.github.io/git-training/docs/first-git-commands/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/first-git-commands/</guid><description>&lt;h1 id="first-steps-first-git-commands"&gt;
 First steps, first Git commands
 &lt;a class="anchor" href="#first-steps-first-git-commands"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;There you go, now you need to have a little bit of context. As we told you, Git is software; it would therefore have to be installed to use it. But we&amp;rsquo;re nice and we promised it was going to be easy. So for the moment you can do all your exercises without installing anything, but one moment or another, you will have to be brave. The more adventurous are already invited to visit the chapter 
 &lt;a href="https://oripekelman.github.io/git-training/docs/git-install/" title="Installing and configuring Git"&gt;Installing and configuring Git&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Let's save our work!</title><link>https://oripekelman.github.io/git-training/docs/save-work-with-git/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/save-work-with-git/</guid><description>&lt;h1 id="lets-save-our-work"&gt;
 Let&amp;rsquo;s save our work!
 &lt;a class="anchor" href="#lets-save-our-work"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;We have chosen to do everything very, but very slowly by explaining each step of the way to you. But you were also promised simplicity. So.. let&amp;rsquo;s imagine we have a project, not yet under Git control (let&amp;rsquo;s call it &lt;code&gt;my_existing_project&lt;/code&gt;) that contains our source code files. How to get them under Git control simply and quickly?&lt;/p&gt;
&lt;p&gt;Nothing&amp;rsquo;s easier:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;cd ~/projects/my_existing_project
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;git init
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;git add .
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;git commit -m&amp;#39;First commit&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol&gt;
&lt;li&gt;We change the current directory in our project.&lt;/li&gt;
&lt;li&gt;We initialize the repository with &lt;code&gt;git init&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git add&lt;/code&gt; tells git to add all files in the current directory, including those in subdirectories (with the &lt;code&gt;.&lt;/code&gt; after the command).&lt;/li&gt;
&lt;li&gt;Then we &lt;strong&gt;commit&lt;/strong&gt; with a message.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;But, we promised detail, so let&amp;rsquo;s go back to our original project which is just an empty Git repository and try to understand more in depth what happened. So if you&amp;rsquo;ve gone elsewhere let&amp;rsquo;s go back to:&lt;/p&gt;</description></item><item><title>Inside the repository, inside the commit</title><link>https://oripekelman.github.io/git-training/docs/inside-git/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/inside-git/</guid><description>&lt;h1 id="inside-the-repository-inside-the-commit"&gt;
 Inside the repository, inside the commit
 &lt;a class="anchor" href="#inside-the-repository-inside-the-commit"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The &lt;strong&gt;commit&lt;/strong&gt; is the most interesting object of Git, our main tool to build a history of our code, to name versions, to collaborate with others.&lt;/p&gt;
&lt;p&gt;Each time we type the command &lt;code&gt;git commit&lt;/code&gt; we create a new record, a new stage point.&lt;/p&gt;
&lt;h2 id="but-what-exactly-is-a-commit"&gt;
 But what exactly is a &lt;strong&gt;commit&lt;/strong&gt;?
 &lt;a class="anchor" href="#but-what-exactly-is-a-commit"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;To fully understand &lt;strong&gt;commit&lt;/strong&gt; we need to take a small detour and encounter two other concepts. The &lt;strong&gt;blob&lt;/strong&gt; which is the content of our files and the &lt;strong&gt;tree&lt;/strong&gt; which are the successive tree structures of files.&lt;/p&gt;</description></item><item><title>We know how to save... but how to modify? to delete ? to cancel?</title><link>https://oripekelman.github.io/git-training/docs/modify-delete-files-with-git/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/modify-delete-files-with-git/</guid><description>&lt;h1 id="we-know-how-to-save-but-how-to-modify-to-delete--to-cancel"&gt;
 We know how to save&amp;hellip; but how to modify? to delete ? to cancel?
 &lt;a class="anchor" href="#we-know-how-to-save-but-how-to-modify-to-delete--to-cancel"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Let&amp;rsquo;s remember two important things: the &lt;strong&gt;commit&lt;/strong&gt; points to a &lt;strong&gt;tree-id&lt;/strong&gt;, so to a tree structure and file content in a specific state, and it also points to &lt;strong&gt;parents&lt;/strong&gt;, so to previous &lt;strong&gt;commit&lt;/strong&gt;s (which naturally point to &lt;strong&gt;tree-id&lt;/strong&gt;s of their own). Deleting is therefore simple: if a file is in the &lt;strong&gt;tree&lt;/strong&gt; of the parent &lt;strong&gt;commit&lt;/strong&gt; but not in the &lt;strong&gt;tree&lt;/strong&gt; of our current &lt;strong&gt;commit&lt;/strong&gt;, then that file has been deleted.&lt;/p&gt;</description></item><item><title>Playing with our revisions</title><link>https://oripekelman.github.io/git-training/docs/play-with-git-revisions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/play-with-git-revisions/</guid><description>&lt;h1 id="playing-with-our-revisions"&gt;
 Playing with our revisions
 &lt;a class="anchor" href="#playing-with-our-revisions"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Now we have learned how to create versions of our code. Did you change a file? We type &lt;code&gt;git commit -am'Added some CSS styles for header'&lt;/code&gt;. Here is a new revision just created.&lt;/p&gt;
&lt;h2 id="view-list-of-revisions-git-log"&gt;
 View list of revisions: &lt;code&gt;git log&lt;/code&gt;
 &lt;a class="anchor" href="#view-list-of-revisions-git-log"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;We can now type &lt;code&gt;git log&lt;/code&gt;; this very useful command lists all the changes in order, the most recent first.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-console" data-lang="console"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;commit 49c6166b1deb64004016a2ffe1c1b75eeadc4a4c (HEAD -&amp;gt; master)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Author: Ori Pekelman &amp;lt;ori+git-training@pekelman.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Date: Mon Feb 2 06:25:44 2026 +0100
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt; Rename files to media
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt;commit 17baa688a633434ea561c8e4ada42d1f9db6c058
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Author: Ori Pekelman &amp;lt;ori+git-training@pekelman.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Date: Mon Feb 2 06:22:10 2026 +0100
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt; Remove license file
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt;commit 13688773276850af857c23ef9125d1f19a0f92f1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Author: Ori Pekelman &amp;lt;ori+git-training@pekelman.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Date: Mon Feb 2 06:17:22 2026 +0100
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt; Add .gitkeep so files will be added to the repository
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt;commit cabdb6f9270182945008cee8acb9871dcf9fc03f
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Author: Ori Pekelman &amp;lt;ori+git-training@pekelman.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Date: Mon Feb 2 06:15:42 2026 +0100
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt; Adding a license file
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt;commit 72c4234bd6c3c16c3b567b851e2c58cedbb019be
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Author: Ori Pekelman &amp;lt;ori+git-training@pekelman.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Date: Mon Feb 2 06:10:30 2026 +0100
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt; Add the list of commands we learned today.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt;commit 0ab682bba608f1b175dd716f8f62de4d462f604f
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Author: Ori Pekelman &amp;lt;ori+git-training@pekelman.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;Date: Mon Feb 2 06:06:51 2026 +0100
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="go"&gt;&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="go"&gt; Added readme.md
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here we have a nice list of everything that happened, all six commits we have made since the beginning. And if we look closely there is nothing there that should surprise us&amp;hellip; &lt;strong&gt;commit&lt;/strong&gt; and its &lt;strong&gt;sha&lt;/strong&gt; then the author and finally the date and our commit message. Only one thing got added there, in the first line: &lt;strong&gt;(HEAD -&amp;gt; master)&lt;/strong&gt;. We&amp;rsquo;ll explain that a bit below. For now let&amp;rsquo;s continue&amp;hellip;&lt;/p&gt;</description></item><item><title>Collaborate with Git</title><link>https://oripekelman.github.io/git-training/docs/collaborate-with-git/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/collaborate-with-git/</guid><description>&lt;h1 id="collaborate-with-git"&gt;
 Collaborate with Git
 &lt;a class="anchor" href="#collaborate-with-git"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;We learned how to save our work by creating a Git repository. Then how to track file and directory changes. We even know how to go back in history, see what has changed.&lt;/p&gt;
&lt;p&gt;We worked on a single branch of our code (the one created by default, &lt;strong&gt;master&lt;/strong&gt;), and moreover it quickly became a bit of a mess, but we also learned to go back to the past to do clean .&lt;/p&gt;</description></item><item><title>Working with remote repositories</title><link>https://oripekelman.github.io/git-training/docs/git-remote/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-remote/</guid><description>&lt;h1 id="working-with-remote-repositories"&gt;
 Working with remote repositories
 &lt;a class="anchor" href="#working-with-remote-repositories"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Everything we have done so far happened on our own disk. We created &lt;strong&gt;blob&lt;/strong&gt;s, &lt;strong&gt;tree&lt;/strong&gt;s and &lt;strong&gt;commit&lt;/strong&gt;s, we moved &lt;strong&gt;HEAD&lt;/strong&gt; around, we made branches and merged one into another — and not a single byte left our machine.&lt;/p&gt;
&lt;p&gt;That is worth pausing on, because it is the thing that makes Git different from the version control systems that came before it. Git does not need a server to work. A repository is complete. The history is &lt;em&gt;ours&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Retrieve and send code</title><link>https://oripekelman.github.io/git-training/docs/git-clone-pull-remote/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-clone-pull-remote/</guid><description>&lt;h1 id="retrieve-and-send-code"&gt;
 Retrieve and send code
 &lt;a class="anchor" href="#retrieve-and-send-code"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;We now know what a &lt;strong&gt;remote&lt;/strong&gt; is: a name for a URL and a &lt;strong&gt;refspec&lt;/strong&gt;, written in &lt;code&gt;.git/config&lt;/code&gt;. We know that &lt;code&gt;origin/master&lt;/code&gt; is a local cache and not the server. Time to actually move objects around.&lt;/p&gt;
&lt;p&gt;Three commands do all the work: &lt;code&gt;git clone&lt;/code&gt; to get a repository in the first place, &lt;code&gt;git fetch&lt;/code&gt; to bring down what changed, &lt;code&gt;git push&lt;/code&gt; to send up what we changed. &lt;code&gt;git pull&lt;/code&gt; is a fourth that is really the second plus a merge, and we are going to be a little rude about it.&lt;/p&gt;</description></item><item><title>A little structure please</title><link>https://oripekelman.github.io/git-training/docs/git-repo-structure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-repo-structure/</guid><description>&lt;h1 id="a-little-structure-please"&gt;
 A little structure please
 &lt;a class="anchor" href="#a-little-structure-please"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Git will let you do anything. Branches called &lt;code&gt;x&lt;/code&gt;, &lt;code&gt;x2&lt;/code&gt;, &lt;code&gt;x2-final&lt;/code&gt;, &lt;code&gt;x2-final-REAL&lt;/code&gt;; forty megabytes of &lt;code&gt;node_modules&lt;/code&gt; in the history; a release identified by &amp;ldquo;the commit Sophie pushed on Thursday&amp;rdquo;. Nothing in the tool prevents it, and for a weekend project nothing bad happens.&lt;/p&gt;
&lt;p&gt;Then two people join, and then a deploy pipeline, and suddenly all of those choices are load-bearing. This chapter is about the conventions that grow on top of Git: what to call things, how to mark releases, what to keep out of the repository, and how to shape your branches. None of it is enforced by Git. All of it is the difference between a repository you can work in and one you dread.&lt;/p&gt;</description></item><item><title>Implement an efficient collaborative workflow</title><link>https://oripekelman.github.io/git-training/docs/git-workflow/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-workflow/</guid><description>&lt;h1 id="politeness-obliges-implement-an-efficient-collaborative-workflow"&gt;
 Politeness obliges: Implement an efficient collaborative workflow
 &lt;a class="anchor" href="#politeness-obliges-implement-an-efficient-collaborative-workflow"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;At the end of 
 &lt;a href="https://oripekelman.github.io/git-training/docs/collaborate-with-git/" title="Collaborate with Git"&gt;Collaborate with Git&lt;/a&gt; we made a promise, and we should keep it. We said:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is the first time in this course where we are not going to tell you the whole truth. Although this is one of the commands you are going to be using very often, building an actual, detailed understanding of what Git merge does is &lt;strong&gt;complicated&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Keep a clean history, recover from mistakes</title><link>https://oripekelman.github.io/git-training/docs/git-cleanup/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-cleanup/</guid><description>&lt;h1 id="keep-a-clean-history-recover-from-mistakes"&gt;
 Keep a clean history, recover from mistakes
 &lt;a class="anchor" href="#keep-a-clean-history-recover-from-mistakes"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;This is the chapter to bookmark.&lt;/p&gt;
&lt;p&gt;Everything so far has been about doing things on purpose. This one is about the other half of the working day: the moment your stomach drops, you stare at the terminal, and you think &lt;em&gt;oh no&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Here is the good news, and it is bigger than you think: &lt;strong&gt;Git almost never loses data that has been committed.&lt;/strong&gt; Not &amp;ldquo;rarely&amp;rdquo;. Almost never. A commit is an immutable object in &lt;code&gt;.git/objects&lt;/code&gt;, and Git does not delete objects when you stop pointing at them — it keeps them, for weeks, and it keeps a log of every ref you have ever moved. Nearly every disaster in this chapter is a &lt;em&gt;pointer&lt;/em&gt; problem, and pointers can be pointed back.&lt;/p&gt;</description></item><item><title>Making the command line yours</title><link>https://oripekelman.github.io/git-training/docs/git-tools/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-tools/</guid><description>&lt;h1 id="making-the-command-line-yours"&gt;
 Making the command line yours
 &lt;a class="anchor" href="#making-the-command-line-yours"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Everything up to here was about Git itself: objects, the &lt;strong&gt;index&lt;/strong&gt;, refs, branches, merges, rebases, remotes. You now know what Git &lt;em&gt;is&lt;/em&gt;. This part of the course is about the other half of the job — making Git pleasant to live with eight hours a day.&lt;/p&gt;
&lt;p&gt;We are unapologetically command-line people here, and this chapter is the reason we can afford to be. A stock Git out of the box is a perfectly good tool that happens to be configured for 2007. Twenty lines of configuration, six aliases and two or three extra programs turn it into something you actually enjoy using.&lt;/p&gt;</description></item><item><title>Hosting Git, and hosting it yourself</title><link>https://oripekelman.github.io/git-training/docs/git-hosting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-hosting/</guid><description>&lt;h1 id="hosting-git-and-hosting-it-yourself"&gt;
 Hosting Git, and hosting it yourself
 &lt;a class="anchor" href="#hosting-git-and-hosting-it-yourself"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Let&amp;rsquo;s start with the sentence that pays for this whole chapter, because once you have it, the rest of the industry stops being confusing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;None of what a forge adds is Git.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Browsing your code in a browser: not Git. Code review with inline comments on a diff: not Git. Issues, labels, milestones, project boards: not Git. CI pipelines, permissions, teams, SSO, protected branches, required reviewers: not Git. Releases with attached binaries, package registries, container registries, secret scanning, dependency alerts: not Git. Git gives you exactly none of that, and — this is the important part — it does not need any of it. A &lt;strong&gt;remote&lt;/strong&gt; is a URL that speaks the Git protocol. That is the entire contract. Everything else GitHub, GitLab, Forgejo or Bitbucket put on top is &lt;em&gt;their&lt;/em&gt; product, invented by them, stored in &lt;em&gt;their&lt;/em&gt; database.&lt;/p&gt;</description></item><item><title>Graphical Git clients</title><link>https://oripekelman.github.io/git-training/docs/git-guis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-guis/</guid><description>&lt;h1 id="graphical-git-clients"&gt;
 Graphical Git clients
 &lt;a class="anchor" href="#graphical-git-clients"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;This course has spent two whole parts insisting on the command line, so you might expect this chapter to be a grudging paragraph and a shrug. It is not. A good graphical Git client is a genuinely useful instrument, and refusing to use one out of terminal machismo is a way of making your life worse for no reason.&lt;/p&gt;
&lt;p&gt;Let me be precise about &lt;em&gt;why&lt;/em&gt; it helps, because &amp;ldquo;it&amp;rsquo;s easier&amp;rdquo; is not the reason.&lt;/p&gt;</description></item><item><title>Editors, IDEs and the file browser</title><link>https://oripekelman.github.io/git-training/docs/git-ides/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-ides/</guid><description>&lt;h1 id="editors-ides-and-the-file-browser"&gt;
 Editors, IDEs and the file browser
 &lt;a class="anchor" href="#editors-ides-and-the-file-browser"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The previous chapter was about dedicated Git clients — programs whose whole job is Git. This one is about the Git integration in the tool you actually spend your day inside. And that distinction matters more than it sounds, because the integration in your editor has one advantage no standalone client can ever have: &lt;strong&gt;it already knows which line you are looking at.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>One repository, many working trees</title><link>https://oripekelman.github.io/git-training/docs/git-worktree/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-worktree/</guid><description>&lt;h1 id="one-repository-many-working-trees"&gt;
 One repository, many working trees
 &lt;a class="anchor" href="#one-repository-many-working-trees"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Here is a situation you have already lived through.&lt;/p&gt;
&lt;p&gt;You are three hours into a feature branch. Half the files are edited, some of them are staged and some are not, there is a &lt;code&gt;TODO half done&lt;/code&gt; in a file you have not even named properly yet. Nothing compiles. And then production catches fire, and you need to look at &lt;code&gt;main&lt;/code&gt; &lt;strong&gt;right now&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Worktrees and agents, parallel work at machine speed</title><link>https://oripekelman.github.io/git-training/docs/git-worktree-agents/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-worktree-agents/</guid><description>&lt;h1 id="worktrees-and-agents-parallel-work-at-machine-speed"&gt;
 Worktrees and agents, parallel work at machine speed
 &lt;a class="anchor" href="#worktrees-and-agents-parallel-work-at-machine-speed"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;The previous chapter taught a 2015 feature. This chapter is about why, ten years later, a lot of people suddenly discovered they needed it.&lt;/p&gt;
&lt;h2 id="what-changed"&gt;
 What changed
 &lt;a class="anchor" href="#what-changed"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;For as long as there has been version control, the rate at which a repository changed was bounded by how fast humans could type. One person, one editor, one working directory: the tooling matched the biology.&lt;/p&gt;</description></item><item><title>Abusing git notes for fun and profit</title><link>https://oripekelman.github.io/git-training/docs/git-notes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-notes/</guid><description>&lt;h1 id="abusing-git-notes-for-fun-and-profit"&gt;
 Abusing git notes for fun and profit
 &lt;a class="anchor" href="#abusing-git-notes-for-fun-and-profit"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;A &lt;strong&gt;commit&lt;/strong&gt; is immutable. Part 1 hammered that in: change one byte of the message, one character of the author name, and you get a different &lt;strong&gt;SHA&lt;/strong&gt;, a different object, a different commit. That is not a bug, it is the whole point. The identity &lt;em&gt;is&lt;/em&gt; the content.&lt;/p&gt;
&lt;p&gt;But information about a commit keeps arriving after the commit exists. This one was reviewed by Sophie. This one passed CI in 4m12s and produced an artifact with digest &lt;code&gt;sha256:9f2a1c&lt;/code&gt;. This one went to production on Tuesday at 18:22. This one, three weeks later, turned out to be the cause of incident INC-482. This one was written by an agent, from a prompt we would quite like to keep.&lt;/p&gt;</description></item><item><title>Big files, or how Git meets its limits</title><link>https://oripekelman.github.io/git-training/docs/git-lfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-lfs/</guid><description>&lt;h1 id="big-files-or-how-git-meets-its-limits"&gt;
 Big files, or how Git meets its limits
 &lt;a class="anchor" href="#big-files-or-how-git-meets-its-limits"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Sooner or later somebody hands you a repository with a 400 MB video in it, or a designer asks where to put the &lt;code&gt;.psd&lt;/code&gt; files, or you join a machine-learning team and discover that their &amp;ldquo;small&amp;rdquo; repo takes forty minutes to clone.&lt;/p&gt;
&lt;p&gt;This chapter is about that. And we will do it in the order that actually teaches something: &lt;strong&gt;first&lt;/strong&gt; we show, from the object model you already know, &lt;em&gt;why&lt;/em&gt; Git is bad at big files. &lt;strong&gt;Then&lt;/strong&gt; we introduce Git LFS as what it really is — a clever workaround bolted onto the side of Git, with real costs.&lt;/p&gt;</description></item><item><title>Git for data and models</title><link>https://oripekelman.github.io/git-training/docs/git-data-science/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-data-science/</guid><description>&lt;h1 id="git-for-data-and-models"&gt;
 Git for data and models
 &lt;a class="anchor" href="#git-for-data-and-models"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Git was designed in 2005 to version the Linux kernel: text, written by humans, in lines, reviewed by other humans. A 4 GB checkpoint is none of those things. Neither is a Parquet file, and neither — as we shall see, painfully — is a Jupyter notebook.&lt;/p&gt;
&lt;p&gt;And yet the data and ML world runs on Git, because there is nothing else that does what Git does. This chapter is about how that actually works in practice: what the community has built on top, what it got right, and where you are expected to know things nobody told you.&lt;/p&gt;</description></item><item><title>Things inspired by Git</title><link>https://oripekelman.github.io/git-training/docs/inspired-by-git/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/inspired-by-git/</guid><description>&lt;h1 id="things-inspired-by-git"&gt;
 Things inspired by Git
 &lt;a class="anchor" href="#things-inspired-by-git"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;We have spent a long time in the machine room. We opened &lt;code&gt;.git/objects&lt;/code&gt; with our bare hands, we followed a &lt;strong&gt;commit&lt;/strong&gt; to a &lt;strong&gt;tree&lt;/strong&gt; to a &lt;strong&gt;blob&lt;/strong&gt;, we watched a &lt;strong&gt;branch&lt;/strong&gt; turn out to be a forty-character string in a file. We learned that a name in Git is derived from the content it names, and that this one trick buys integrity, deduplication and cheap comparison all at once.&lt;/p&gt;</description></item><item><title>GitOps</title><link>https://oripekelman.github.io/git-training/docs/git-ops/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-ops/</guid><description>&lt;h1 id="gitops"&gt;
 GitOps
 &lt;a class="anchor" href="#gitops"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;We have spent four parts of this course learning what Git actually is: a content-addressed
database of &lt;strong&gt;commit&lt;/strong&gt;s, &lt;strong&gt;tree&lt;/strong&gt;s and &lt;strong&gt;blob&lt;/strong&gt;s, with a few movable references pointing into it.
We now know how to branch, merge, rebase, push, tag and recover. This last part is about what
happens when we point all of that at &lt;em&gt;machines&lt;/em&gt; instead of at colleagues.&lt;/p&gt;
&lt;p&gt;And the first idea we need is the one with the marketing name: &lt;strong&gt;GitOps&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Continuous integration with Git</title><link>https://oripekelman.github.io/git-training/docs/git-ci/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-ci/</guid><description>&lt;h1 id="continuous-integration-with-git"&gt;
 Continuous integration with Git
 &lt;a class="anchor" href="#continuous-integration-with-git"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;h2 id="what-continuous-integration-is-for"&gt;
 What continuous integration is for
 &lt;a class="anchor" href="#what-continuous-integration-is-for"&gt;#&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Continuous integration is not &amp;ldquo;we have a build server&amp;rdquo;. A build server is a machine. CI is a
&lt;em&gt;promise&lt;/em&gt;, and the promise has two halves:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;the mainline is always known-good, so anybody can branch from it at any moment without
inheriting somebody else&amp;rsquo;s mess;&lt;/li&gt;
&lt;li&gt;the feedback arrives while the author still remembers the change.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The second half is the one people underestimate. A test failure that reaches you in ninety
seconds is a small annoyance. The same failure reaching you tomorrow morning is an
archaeological dig, because you have already started something else and your head is empty of
the context that would have made the bug obvious.&lt;/p&gt;</description></item><item><title>Deploying a simple static site</title><link>https://oripekelman.github.io/git-training/docs/git-static-site/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-static-site/</guid><description>&lt;h1 id="deploying-a-simple-static-site"&gt;
 Deploying a simple static site
 &lt;a class="anchor" href="#deploying-a-simple-static-site"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Right at the beginning of this course, in 
 &lt;a href="https://oripekelman.github.io/git-training/docs/git-ecosystem/" title="Git and its ecosystem"&gt;Git and its ecosystem&lt;/a&gt;,
I promised you that we would &amp;ldquo;deploy a project on a real server, hands-free&amp;rdquo;. This is the chapter
where we do it. By the end of it you will type &lt;code&gt;git push&lt;/code&gt; and a website will change.&lt;/p&gt;
&lt;p&gt;We are going to deploy a &lt;strong&gt;static site&lt;/strong&gt; — a pile of HTML, CSS, images and maybe a JavaScript
file — and that is a deliberate choice, not a simplification we are embarrassed about. A static
site is the perfect first deployment because its build output is &lt;em&gt;just files&lt;/em&gt;. There is no process
to restart, no database to migrate, no connection pool to drain. Every mechanism is visible and
every step is comprehensible, which means we can build the whole thing ourselves out of Git parts
we already own, and &lt;em&gt;then&lt;/em&gt; look at the hosted services and understand exactly what they are doing
for us.&lt;/p&gt;</description></item><item><title>Continuous deployment</title><link>https://oripekelman.github.io/git-training/docs/git-cd/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-cd/</guid><description>&lt;h1 id="continuous-deployment"&gt;
 Continuous deployment
 &lt;a class="anchor" href="#continuous-deployment"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;In the 
 &lt;a href="https://oripekelman.github.io/git-training/docs/git-static-site/" title="Deploying a simple static site"&gt;previous chapter&lt;/a&gt; we deployed a site by pushing
to a branch, and the whole mechanism fitted in a shell script. Real applications are not much
harder — but they force us to be precise about &lt;em&gt;when&lt;/em&gt; a release happens, &lt;em&gt;what&lt;/em&gt; exactly gets
released, and what we do when it goes wrong.&lt;/p&gt;
&lt;p&gt;All three of those questions have Git answers, which is why this chapter belongs in a Git course.&lt;/p&gt;</description></item><item><title>Shining in society and amazing friends with Gitfoo</title><link>https://oripekelman.github.io/git-training/docs/git-foo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-foo/</guid><description>&lt;h1 id="shining-in-society-and-amazing-friends-with-gitfoo"&gt;
 Shining in society and amazing friends with Gitfoo
 &lt;a class="anchor" href="#shining-in-society-and-amazing-friends-with-gitfoo"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Here is our grab-bag. What follows is forty-odd short tricks, each one a question you will
eventually ask out loud followed by the command that answers it — originally a French &amp;ldquo;Git Daily&amp;rdquo;
series, one tip per day, which is why it is deliberately terser than the rest of this course. No
theory here, no peeking under the hood: dip in, steal something, come back another day.&lt;/p&gt;</description></item><item><title>Installing and configuring Git</title><link>https://oripekelman.github.io/git-training/docs/git-install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-install/</guid><description>&lt;h1 id="installing-and-configuring-git"&gt;
 Installing and configuring Git
 &lt;a class="anchor" href="#installing-and-configuring-git"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;As we said there are many ways to use Git — through the web, with a graphical client, from inside an IDE — but this course concentrates on its use at the command line, with the &amp;ldquo;official&amp;rdquo; version. Everything you need starts here: 
 &lt;a href="https://git-scm.com/downloads"&gt;https://git-scm.com/downloads&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#x2139;&amp;#xfe0f;
&lt;strong&gt;The command line.&lt;/strong&gt; If you are not comfortable with a terminal, take a quick detour through 
 &lt;a href="https://tutorial.djangogirls.org/en/intro_to_command_line/"&gt;https://tutorial.djangogirls.org/en/intro_to_command_line/&lt;/a&gt; — you will see, you get a taste for it quickly. And remember that &amp;ldquo;terminal&amp;rdquo;, &amp;ldquo;terminal emulator&amp;rdquo;, &amp;ldquo;console&amp;rdquo;, &amp;ldquo;command line&amp;rdquo; and &amp;ldquo;command prompt&amp;rdquo; all mean the same small window in which you type things and press enter.&lt;/p&gt;</description></item><item><title>Configure Git with an SSH key</title><link>https://oripekelman.github.io/git-training/docs/git-ssh/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/git-ssh/</guid><description>&lt;h1 id="configure-git-with-an-ssh-key"&gt;
 Configure Git with an SSH key
 &lt;a class="anchor" href="#configure-git-with-an-ssh-key"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#x2139;&amp;#xfe0f;
Most Git servers authenticate you with an SSH public key. SSH is a protocol for talking to remote machines securely. To use it you create an &amp;ldquo;identity&amp;rdquo; made of two files: one public, one private. The private one must be protected really well — it is a bit like your password, except that unlike a password it never leaves your computer. If you want the long version, GitHub&amp;rsquo;s own guide is a good one: 
 &lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh"&gt;https://docs.github.com/en/authentication/connecting-to-github-with-ssh&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Create and configure your GitHub or GitLab account</title><link>https://oripekelman.github.io/git-training/docs/github-gitlab/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://oripekelman.github.io/git-training/docs/github-gitlab/</guid><description>&lt;h1 id="create-and-configure-your-github-or-gitlab-account"&gt;
 Create and configure your GitHub or GitLab account
 &lt;a class="anchor" href="#create-and-configure-your-github-or-gitlab-account"&gt;#&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Git works perfectly well with no account on anything. You can commit for years on your own laptop and never talk to a server. But sooner or later you want a copy of your work somewhere that isn&amp;rsquo;t your laptop, and you want other people to be able to read it — and that means an account on a hosting service.&lt;/p&gt;</description></item></channel></rss>