|
__init__(self,
path)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
_check_dirs(self)
Get top level dir and git meta data dir |
|
|
bool
|
_cmd_has_feature(self,
command,
feature)
Check if the git command has certain feature enabled. |
|
|
|
_git_command(self,
command,
args=[ ] ,
extra_env=None,
interactive=False)
Execute git command with arguments args and environment env at path. |
|
|
tuple of list of str and
int
|
_git_getoutput(self,
command,
args=[ ] ,
extra_env=None,
cwd=None)
Run a git command and return the output |
|
|
tuple of str , str ,
int
|
_git_inout(self,
command,
args,
input=None,
extra_env=None,
cwd=None,
capture_stderr=False,
capture_stdout=True)
Run a git command with input and return output |
|
|
|
_git_inout2(self,
command,
args,
stdin=None,
extra_env=None,
cwd=None,
capture_stderr=False)
Quite similar to _git_inout() but returns stdout output
of the git command as a Python generator object, instead. |
|
|
|
_status(self,
porcelain,
ignore_untracked) |
|
|
None or generator of str
|
archive(self,
format,
prefix,
output,
treeish,
paths=None)
Create an archive from a treeish |
|
|
|
clean(self,
directories=False,
force=False,
dry_run=False)
Remove untracked files from the working tree. |
|
|
|
collect_garbage(self,
auto=False)
Cleanup unnecessary files and optimize the local repository |
|
|
|
force_head(self,
commit,
hard=False)
Force HEAD to a specific commit |
|
|
GitModifier
|
get_author_info(self)
Determine a sane values for author name and author email from git's
config and environment variables. |
|
|
str
|
get_config(self,
name)
Gets the config value associated with name |
|
|
tuple
|
is_clean(self,
ignore_untracked=False)
Does the repository contain any uncommitted modifications? |
|
|
bool
|
|
str
|
rev_parse(self,
name,
short=0)
Find the SHA1 of a given name |
|
|
|
status(self,
pathlist=None)
Check status of repository. |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
list
|
|
|
branch_contains(self,
branch,
commit,
remote=False)
Check if branch branch contains commit commit |
|
|
|
create_branch(self,
branch,
rev=None,
force=False)
Create a new branch |
|
|
|
|
str
|
get_branch(self)
On what branch is the current working copy |
|
|
list
|
|
str
|
get_merge_base(self,
commit1,
commit2)
Get the common ancestor between two commits |
|
|
str
|
|
list
|
|
str
|
|
bool
|
has_branch(self,
branch,
remote=False)
Check if the repository has branch named branch. |
|
|
tuple
|
is_fast_forward(self,
from_branch,
to_branch)
Check if an update from from_branch to to_branch would
be a fast forward or if the branch is up to date already. |
|
|
|
merge(self,
commit,
verbose=False,
edit=False)
Merge changes from the named commit into the current branch |
|
|
|
|
|
|
|
|
|
update_ref(self,
ref,
new,
old=None,
msg=None)
Update ref ref to commit new if ref currently
points to old |
|
|
|
create_tag(self,
name,
msg=None,
commit=None,
sign=False,
keyid=None,
annotate=False)
Create a new tag. |
|
|
|
|
str
|
describe(self,
commitish,
pattern=None,
longfmt=False,
always=False,
abbrev=None,
tags=False,
exact_match=False)
Describe commit, relative to the latest tag reachable from it. |
|
|
str
|
find_tag(self,
commit,
pattern=None)
Find the closest tag to a given commit |
|
|
list of str
|
|
bool
|
has_tag(self,
tag)
Check if the repository has a tag named tag. |
|
|
|
|
bool
|
|
|
checkout(self,
treeish)
Checkout treeish |
|
|
str
|
|
bool
|
has_treeish(self,
treeish)
Check if the repository has the treeish object treeish. |
|
|
list of objects. See above.
|
list_tree(self,
treeish,
recurse=False,
paths=None)
Get a trees content. |
|
|
|
make_tree(self,
contents)
Create a tree based on contents. |
|
|
str
|
write_tree(self,
index_file=None)
Create a tree object from the current index |
|
|
|
add_remote_repo(self,
name,
url,
tags=True,
fetch=False)
Add a tracked remote repository |
|
|
|
fetch(self,
repo=None,
tags=False,
depth=0,
refspec=None,
all_remotes=False)
Download objects and refs from another repository. |
|
|
dict of list of str
|
|
dict of GitRemote
|
|
bool
|
|
|
pull(self,
repo=None,
ff_only=False,
all_remotes=False)
Fetch and merge from another repository |
|
|
|
push(self,
repo=None,
src=None,
dst=None,
ff_only=True,
force=False,
tags=False)
Push changes to the remote repo |
|
|
|
push_tag(self,
repo,
tag)
Push a tag to the remote repo |
|
|
|
remove_remote_repo(self,
name) |
|
|
|
add_files(self,
paths,
force=False,
untracked=True,
index_file=None,
work_tree=None)
Add files to a the repository |
|
|
list of str
|
list_files(self,
types=[ ' cached ' ] )
List files in index and working tree |
|
|
|
remove_files(self,
paths,
verbose=False)
Remove files from the repository |
|
|
str
|
write_file(self,
filename,
filters=True)
Hash a single file and write it into the object database |
|
|
|
_commit(self,
msg,
args=[ ] ,
author_info=None,
committer_info=None,
edit=False) |
|
|
|
commit_all(self,
msg,
author_info=None,
edit=False)
Commit all changes to the repository |
|
|
|
commit_dir(self,
unpack_dir,
msg,
branch,
other_parents=None,
author={ } ,
committer={ } ,
create_missing_branch=False)
Replace the current tip of branch branch with the contents
from unpack_dir |
|
|
|
commit_files(self,
files,
msg,
author_info=None,
committer_info=None,
edit=False)
Commit the given files to the repository |
|
|
|
commit_staged(self,
msg,
author_info=None,
edit=False,
committer_info=None)
Commit currently staged files to the repository |
|
|
|
commit_tree(self,
tree,
msg,
parents,
author={ } ,
committer={ } )
Commit a tree with commit msg msg and parents parents |
|
|
str
|
create_tree(self,
unpack_dir)
Create a tree object out of a directory content |
|
|
dict
|
|
|
get_commits(self,
since=None,
until=None,
paths=None,
num=0,
first_parent=False,
options=None)
Get commits from since to until touching paths |
|
|
str
|
get_subject(self,
commit)
Gets the subject of a commit. |
|
|
|
grep_log(self,
regex,
since=None)
Get commmits matching regex |
|
|
|
show(self,
id)
git-show id |
|
|
|
apply_patch(self,
patch,
index=True,
context=None,
strip=None)
Apply a patch using git apply |
|
|
str
|
diff(self,
obj1,
obj2=None,
paths=None,
stat=False,
summary=False,
text=False,
ignore_submodules=True)
Diff two git repository objects |
|
|
defaultdict of str
|
diff_status(self,
obj1,
obj2)
Get file-status of two git repository objects |
|
|
|
format_patches(self,
start,
end,
output_dir,
signature=True,
thread=None,
symmetric=True)
Output the commits between start and end as patches in output_dir. |
|
|
|
|
list of tuples
|
get_submodules(self,
treeish,
path=None,
recursive=True)
List the submodules of treeish |
|
|
bool
|
|
|
update_submodules(self,
init=True,
recursive=True,
fetch=False)
Update all submodules |
|
|