hopsworks.git_repo #
[source] GitRepo #
Returned by
[source] read_only property #
If True then the repository functions GitRepo.commit, GitRepo.push and GitRepo.checkout_files are forbidden.
[source] status #
status()
Get the status of the repo.
| RETURNS | DESCRIPTION |
|---|---|
|
|
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |
[source] delete #
delete()
Delete the git repo from the filesystem.
Potentially dangerous operation
This operation deletes the cloned git repository from the filesystem.
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request |
[source] commit #
Add changes and new files, and then commit them.
| PARAMETER | DESCRIPTION |
|---|---|
message | Commit message. TYPE: |
all | Automatically stage files that have been modified and deleted, but new files are not affected. TYPE: |
files | List of new files to add and commit. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |
[source] reset #
Reset the branch to a specific commit or to a local branch or to a remote branch.
| PARAMETER | DESCRIPTION |
|---|---|
remote | Name of the remote. TYPE: |
branch | Name of the branch. TYPE: |
commit | Hash of the commit. TYPE: |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |
[source] get_commits #
Get the commits for the repo and branch.
| PARAMETER | DESCRIPTION |
|---|---|
branch | Name of the branch. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
list[git_commit.GitCommit] | The list of commits for this repo. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |
[source] add_remote #
Add a remote for the repo.
import hopsworks
project = hopsworks.login()
git_api = project.get_git_api()
repo = git_api.get_repo("my_repo")
repo.add_remote("upstream", "https://github.com/organization/repo.git")
| PARAMETER | DESCRIPTION |
|---|---|
name | Name of the remote. TYPE: |
url | Url of the remote. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
GitRemote | The created remote. |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |
[source] get_remote #
Get a remote by name for the repo.
| PARAMETER | DESCRIPTION |
|---|---|
name | Name of the remote. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
GitRemote | The git remote metadata object or |
| RAISES | DESCRIPTION |
|---|---|
hopsworks.client.exceptions.RestAPIError | If the backend encounters an error when handling the request. |