git-sync-js / sync
Module: sync
Table of contents
Functions
Functions
commitFiles
▸ commitFiles(dir
, username
, email
, message?
, filesToIgnore?
, logger?
): Promise
<IGitResult
>
Git add and commit all file
Parameters
Name | Type | Default value |
---|---|---|
dir | string | undefined |
username | string | undefined |
email | string | undefined |
message | string | 'Commit with Git-Sync-JS' |
filesToIgnore | string [] | [] |
logger? | ILogger | undefined |
Returns
Promise
<IGitResult
>
Defined in
continueRebase
▸ continueRebase(dir
, username
, email
, logger?
, providedRepositoryState?
): Promise
<void
>
try to continue rebase, simply adding and committing all things, leave them to user to resolve in the TiddlyWiki later.
Parameters
Name | Type | Description |
---|---|---|
dir | string | |
username | string | |
email | string | |
logger? | ILogger | - |
providedRepositoryState? | string | result of await getGitRepositoryState(dir, logger) , optional, if not provided, we will run await getGitRepositoryState(dir, logger) by ourself. |
Returns
Promise
<void
>
Defined in
fetchRemote
▸ fetchRemote(dir
, remoteName
, branch?
): Promise
<void
>
Simply calling git fetch.
Parameters
Name | Type | Description |
---|---|---|
dir | string | - |
remoteName | string | - |
branch? | string | if not provided, will fetch all branches |
Returns
Promise
<void
>
Defined in
mergeUpstream
▸ mergeUpstream(dir
, branch
, remoteName
, userInfo?
, logger?
): Promise
<IGitResult
>
Git merge origin master
Parameters
Name | Type |
---|---|
dir | string |
branch | string |
remoteName | string |
userInfo? | IGitUserInfos | IGitUserInfosWithoutToken |
logger? | ILogger |
Returns
Promise
<IGitResult
>
Defined in
pushUpstream
▸ pushUpstream(dir
, branch
, remoteName
, userInfo?
, logger?
): Promise
<IGitResult
>
Git push -f origin master
This does force push, to deal with --allow-unrelated-histories
case
Parameters
Name | Type |
---|---|
dir | string |
branch | string |
remoteName | string |
userInfo? | IGitUserInfos | IGitUserInfosWithoutToken |
logger? | ILogger |
Returns
Promise
<IGitResult
>