File: git-init.rst

package info (click to toggle)
python-pygit2 1.18.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,720 kB
  • sloc: ansic: 12,584; python: 9,337; sh: 205; makefile: 26
file content (41 lines) | stat: -rw-r--r-- 1,277 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
**********************************************************************
git-init
**********************************************************************

----------------------------------------------------------------------
Creating a new repository
----------------------------------------------------------------------

======================================================================
Create bare repository
======================================================================

.. code-block:: bash

    $ git init --bare path/to/git

.. code-block:: python

    >>> pygit2.init_repository('path/to/git', True)
    <pygit2.repository.Repository object at 0x10f08b680>

======================================================================
Create standard repository
======================================================================

.. code-block:: bash

    $ git init path/to/git

.. code-block:: python

    >>> pygit2.init_repository('path/to/git', False)
    <pygit2.repository.Repository object at 0x10f08b680>

----------------------------------------------------------------------
References
----------------------------------------------------------------------

- git-init_

.. _git-init: https://www.kernel.org/pub/software/scm/git/docs/git-init.html