Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > d92aa75c2d384ff9f513aed09a46f703 > files > 157

parrot-doc-3.1.0-2.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Parrot  - Git Terminology</title>
        <link rel="stylesheet" type="text/css"
            href="../../../resources/parrot.css"
            media="all">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    </head>
    <body>
        <div id="wrapper">
            <div id="header">

                <a href="http://www.parrot.org">
                <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot">
                </a>
            </div> <!-- "header" -->
            <div id="divider"></div>
            <div id="mainbody">
                <div id="breadcrumb">
                    <a href="../../../html/index.html">Home</a> &raquo; <a href="../../../html/developer.html">Developer Documentation</a> &raquo; Git Terminology
                </div>

<h1><a name="NAME"
>NAME</a></h1>

<p>docs/project/git_terminology.pod &#45; Git Terminology</p>

<h1><a name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>This document describes terms that are used in <em>docs/project/git_workflow.pod</em> and contains generally useful things to know about Git.</p>

<h1><a name="INTRODUCTION"
>INTRODUCTION</a></h1>

<p>Before learning any terminology,
there are a few very basic things that should be understood about Git,
which will provide a foundation for understanding anything else.</p>

<p>A Git repository is a Directed Acyclic Graph (DAG),
where each node in the graph is a commit,
with zero or more parents.
A root commit of a repository has zero parents,
others have at least one parent.
A repository may have any number of root commits,
but many have only one.
If a commit has more than one parent,
that means it was the result of a merge.</p>

<p>Each commit is uniquely identified by a SHA1 sum.
You may refer to any commit by the first few characters of a SHA1 sum,
as long as it is unique.
If it is not unique,
<code>git</code> will complain loudly.
Usually 6&#45;7 characters of a SHA1 is sufficient,
but this number increases as the number of commits in a repo grows.</p>

<p>There are three distinct &#34;places&#34; in a Git repository,
which are referred to as the index,
the working copy,
and the staging area.
The index is the actual DAG,
where all the history of the repo is stored.
This lives in the .git directory of a repository.
The &#34;working copy&#34; are the actual files on the filesystem.
The staging area is where things that will be included in the next commit live,
which happens to be inside the .git directory as well.
When you type <code>git add foo</code>,
you are adding the file/directory foo to the staging area.
When you type <code>git log</code> you are asking the index to show you a log of all commits.
When you run a non&#45;git command in a repo,
such as <code>rm foo</code>,
you are modifying the working copy.</p>

<p>The most important thing to learn when understanding a <code>git</code> command is whether it operates on the index,
working copy,
staging area or a combination of the three.
Also note that certain <code>git</code> commands can operate on different areas when given different command&#45;line options.</p>

<h1><a name="HELPING_YOURSELF"
>HELPING YOURSELF</a></h1>

<p>Git comes with extensive documentation.
To get the short help summary for a git command,
do <code>git cmd &#45;h</code>.
To see the manual for a git command,
type <code>git help cmd</code>,
where &#34;cmd&#34; is the name of the command you want to look up.</p>

<h1><a name="TERMS"
>TERMS</a></h1>

<h2><a name="branch"
>branch</a></h2>

<p>Noun.
A symbolic name referring to a commit SHA1.
The master branch is just a branch called master,
it is not special in any way except that it is the default.</p>

<p>Verb.
To create a divergent history of commits from a given commit,
branch or tag.</p>

<h2><a name="clone"
>clone</a></h2>

<p>Verb.
The term used for copying a remote repo locally,
which contains the entire history of the git repo being cloned.</p>

<h2><a name="commit&#45;ish,_committish"
>commit&#45;ish,
committish</a></h2>

<p>Noun.
A general term for a way to describe a set of commits.</p>

<h2><a name="rebase"
>rebase</a></h2>

<p>Verb.
Update the local index with changes from a remote,
then replay local changes,
in order,
on top of them.
This prevents &#34;useless merge commits&#34;,
such as:</p>

<pre>    Merge branch &#39;master&#39; of github.com:parrot/parrot</pre>

<p>The <code>git pull &#45;&#45;rebase</code> command can be used to update your master branch from the remote called &#39;origin&#39;. There is also a <code>git rebase</code> command that can be used to rebase branches onto each other.</p>

<h2><a name="remote"
>remote</a></h2>

<p>Noun. A remote is basically a URL with metadata that describes where changes are pushed/pulled from. A git repo may have any number of remotes. The default remote is where the repo was originally cloned from and it has the name &#34;origin&#34;.</p>

<h2><a name="repo"
>repo</a></h2>

<p>Noun. Short for repository.</p>

<h2><a name="SHA1"
>SHA1</a></h2>

<p>Noun. Secure Hash Algorithm 1. Also called a SHA1 sum or SHA1 hash. Every git commit is uniquely identified by a SHA1. This is roughly similar to a Subversion Revision, but it is not an integer and does not increase linearly, because git commits can have any number of parents.</p>

<h2><a name="tag"
>tag</a></h2>

<p>Noun. A symbolic name for a SHA1. A tag is like a variable, which points to a specific SHA1. Tags can change, but usually they don&#39;t. A tag is akin to a domain name, which points to an IP address. Run <code>git help tag</code> for more information.</p>

<p>Verb. The process of giving a sha1 a symbolic name, such as giving commit 9560334cf the symbolic name &#34;RELEASE_42_0_1&#34;.</p>

<h2><a name="topic_branch"
>topic branch</a></h2>

<p>Noun. Any branch that is not the master branch.</p>

<h1><a name="SEE_ALSO"
>SEE ALSO</a></h1>

<p><em>docs/project/git_workflow.pod</em></p>
            </div> <!-- "mainbody" -->
            <div id="divider"></div>
            <div id="footer">
	        Copyright &copy; 2002-2011, Parrot Foundation.
            </div>
        </div> <!-- "wrapper" -->
    </body>
</html>