Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 7e647d9940d31b34c253e6f71c416c4b > files > 3149

bzr-2.7.0-6.mga7.aarch64.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>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Starting a project &#8212; Bazaar 2.7.0 documentation</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    
    <link rel="shortcut icon" href="../_static/bzr.ico"/>
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Controlling file registration" href="controlling_registration.html" />
    <link rel="prev" title="Going solo" href="solo_intro.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="controlling_registration.html" title="Controlling file registration"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="solo_intro.html" title="Going solo"
             accesskey="P">previous</a> |</li>
<li><a href="http://bazaar.canonical.com/">
    <img src="../_static/bzr icon 16.png" /> Home</a>&nbsp;|&nbsp;</li>
<a href="http://doc.bazaar.canonical.com/en/">Documentation</a>&nbsp;|&nbsp;</li>

        <li class="nav-item nav-item-0"><a href="../index.html">Table of Contents (2.7.0)</a> &#187;</li>

          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Bazaar User Guide</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="starting-a-project">
<h1>Starting a project<a class="headerlink" href="#starting-a-project" title="Permalink to this headline">¶</a></h1>
<div class="section" id="putting-an-existing-project-under-version-control">
<h2>Putting an existing project under version control<a class="headerlink" href="#putting-an-existing-project-under-version-control" title="Permalink to this headline">¶</a></h2>
<p>If you already have a tree of source code (or directory of documents) you
wish to put under version control, here are the commands to use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">my</span><span class="o">-</span><span class="n">stuff</span>
<span class="n">bzr</span> <span class="n">init</span>
<span class="n">bzr</span> <span class="n">add</span>
<span class="n">bzr</span> <span class="n">commit</span> <span class="o">-</span><span class="n">m</span> <span class="s2">&quot;Initial import&quot;</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">bzr</span> <span class="pre">init</span></code> creates a <code class="docutils literal notranslate"><span class="pre">.bzr</span></code> directory in the top level directory
(<code class="docutils literal notranslate"><span class="pre">my-stuff</span></code> in the example above). Note that:</p>
<blockquote>
<div><ul class="simple">
<li>Bazaar has everything it needs in that directory - you do
<strong>not</strong> need to setup a database, web server or special service
to use it</li>
<li>Bazaar is polite enough to only create one <code class="docutils literal notranslate"><span class="pre">.bzr</span></code> in the
directory given, not one in every subdirectory thereof.</li>
</ul>
</div></blockquote>
<p><code class="docutils literal notranslate"><span class="pre">bzr</span> <span class="pre">add</span></code> then finds all the files and directories it thinks
ought to be version controlled and registers them internally.
<code class="docutils literal notranslate"><span class="pre">bzr</span> <span class="pre">commit</span></code> then records a snapshot of the content of these
and records that information, together with a commit message.</p>
<p>More information on <code class="docutils literal notranslate"><span class="pre">init</span></code>, <code class="docutils literal notranslate"><span class="pre">add</span></code> and <code class="docutils literal notranslate"><span class="pre">commit</span></code> will be provided
later. For now, the important thing to remember is the recipe above.</p>
</div>
<div class="section" id="starting-a-new-project">
<h2>Starting a new project<a class="headerlink" href="#starting-a-new-project" title="Permalink to this headline">¶</a></h2>
<p>If you are starting a project from scratch, you can also use the recipe
above, after creating an empty directory first of course. For efficiency
reasons that will be explored more in later chapters though, it is a good
idea to create a repository for the project at the top level and to nest
a <em>main</em> branch within it like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">bzr</span> <span class="n">init</span><span class="o">-</span><span class="n">repo</span> <span class="n">my</span><span class="o">.</span><span class="n">repo</span>
<span class="n">cd</span> <span class="n">my</span><span class="o">.</span><span class="n">repo</span>
<span class="n">bzr</span> <span class="n">init</span> <span class="n">my</span><span class="o">.</span><span class="n">main</span>
<span class="n">cd</span> <span class="n">my</span><span class="o">.</span><span class="n">main</span>
<span class="n">hack</span><span class="p">,</span> <span class="n">hack</span><span class="p">,</span> <span class="n">hack</span>
<span class="n">bzr</span> <span class="n">add</span>
<span class="n">bzr</span> <span class="n">commit</span> <span class="o">-</span><span class="n">m</span> <span class="s2">&quot;Initial import&quot;</span>
</pre></div>
</div>
<p>Some users prefer a name like <em>trunk</em> or <em>dev</em> to <em>main</em>. Choose
whichever name makes the most sense to you.</p>
<p>Note that the <code class="docutils literal notranslate"><span class="pre">init-repo</span></code> and <code class="docutils literal notranslate"><span class="pre">init</span></code> commands both take a path as an
argument and will create that path if it doesn’t already exist.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Starting a project</a><ul>
<li><a class="reference internal" href="#putting-an-existing-project-under-version-control">Putting an existing project under version control</a></li>
<li><a class="reference internal" href="#starting-a-new-project">Starting a new project</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="solo_intro.html"
                        title="previous chapter">Going solo</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="controlling_registration.html"
                        title="next chapter">Controlling file registration</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/user-guide/starting_a_project.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="controlling_registration.html" title="Controlling file registration"
             >next</a></li>
        <li class="right" >
          <a href="solo_intro.html" title="Going solo"
             >previous</a> |</li>
<li><a href="http://bazaar.canonical.com/">
    <img src="../_static/bzr icon 16.png" /> Home</a>&nbsp;|&nbsp;</li>
<a href="http://doc.bazaar.canonical.com/en/">Documentation</a>&nbsp;|&nbsp;</li>

        <li class="nav-item nav-item-0"><a href="../index.html">Table of Contents (2.7.0)</a> &#187;</li>

          <li class="nav-item nav-item-1"><a href="index.html" >Bazaar User Guide</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2009-2011 Canonical Ltd.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.4.
    </div>
  </body>
</html>