<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Part 2 — Collaborating on Git Getting Started!</title><link>https://oripekelman.github.io/git-training/docs/2-collaborating/</link><description>Recent content in Part 2 — Collaborating on Git Getting Started!</description><generator>Hugo</generator><language>en</language><atom:link href="https://oripekelman.github.io/git-training/docs/2-collaborating/index.xml" rel="self" type="application/rss+xml"/><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></channel></rss>