Git

class lib.git.Git

Bases: object

Handles calls to github

Attributes Summary

branch

The git branch that is currently being used to execute Faceswap.

branches

List of all available branches.

status

Obtain the output of git status for tracked files only

Methods Summary

checkout(branch)

Checkout the requested branch

get_commits(count)

Obtain the last commits to the repo

pull()

Pull the current branch

update_remote()

Update all branches to track remote

Attributes Documentation

branch

The git branch that is currently being used to execute Faceswap.

Type:

str

branches

List of all available branches.

Type:

list[str]

status

Obtain the output of git status for tracked files only

Methods Documentation

checkout(branch: str) bool

Checkout the requested branch

Parameters:

branch (str) – The branch to checkout

Returns:

True if the branch was succesfully checkout out otherwise False

Return type:

bool

get_commits(count: int) list[str]

Obtain the last commits to the repo

Parameters:

count (int) – The last number of commits to obtain

Returns:

list of commits, or empty list if none found

Return type:

list[str]

pull() bool

Pull the current branch

Returns:

True if pull is successful otherwise False

Return type:

bool

update_remote() bool

Update all branches to track remote

Returns:

True if update was succesful otherwise False

Return type:

bool

property branch: str

The git branch that is currently being used to execute Faceswap.

Type:

str

property branches: list[str]

List of all available branches.

Type:

list[str]

checkout(branch: str) bool

Checkout the requested branch

Parameters:

branch (str) – The branch to checkout

Returns:

True if the branch was succesfully checkout out otherwise False

Return type:

bool

get_commits(count: int) list[str]

Obtain the last commits to the repo

Parameters:

count (int) – The last number of commits to obtain

Returns:

list of commits, or empty list if none found

Return type:

list[str]

pull() bool

Pull the current branch

Returns:

True if pull is successful otherwise False

Return type:

bool

property status: list[str]

Obtain the output of git status for tracked files only

update_remote() bool

Update all branches to track remote

Returns:

True if update was succesful otherwise False

Return type:

bool