Git Client Class
Kind: global class
Access: public
create a git client with root dir and credential info
Param | Type | Description |
---|---|---|
dir | String |
|
credentials | Object |
optional |
init a git repo
Kind: instance method of GitClient
clone a git repo
Kind: instance method of GitClient
Param | Type |
---|---|
url | String |
branchName | String |
get commits from remote and merge with local changes
Kind: instance method of GitClient
fetch commits
Kind: instance method of GitClient
Param | Type |
---|---|
remoteName | String |
fetch commits from all remotes
Kind: instance method of GitClient
push commits to remote
Kind: instance method of GitClient
add files to index
Kind: instance method of GitClient
Param | Type | Description |
---|---|---|
pathspec | String | Array |
- Array: file path list - String: file path or glob rule |
reset files from index to last commit
Kind: instance method of GitClient
Param | Type | Description |
---|---|---|
pathspec | String | Array |
- Array: file path list - String: file path or glob rule |
remove files from index
Kind: instance method of GitClient
Param | Type | Description |
---|---|---|
pathspec | String | Array |
- Array: file path list - String: file path or glob rule |
commit a message
Kind: instance method of GitClient
Param | Type |
---|---|
message | String |
options | Object |
get status of index and work directory
Kind: instance method of GitClient
Param | Type |
---|---|
untracted | Boolean |
get branches info
Kind: instance method of GitClient