src/utils/remote.js
function push(repoState, driver, opts = {}) {
    opts = Object.assign({
        branch: repoState.getCurrentBranch(),
        force: false,
        remote: {
            name: 'origin'
        }
    }, opts);

    return driver.push(opts) // Can fail with NOT_FAST_FORWARD
    // TODO update remote branch in repoState list of branches
    .thenResolve(repoState);
}
function push(repoState, driver, opts = {}) {
    opts = Object.assign({
        branch: repoState.getCurrentBranch(),
        force: false,
        remote: {
            name: 'origin'
        }
    }, opts);

    return driver.push(opts) // Can fail with NOT_FAST_FORWARD
    // TODO update remote branch in repoState list of branches
    .thenResolve(repoState);
}
function push ( repoState , driver , opts = { } ) { opts = Object . assign ( { branch : repoState . getCurrentBranch ( ) , force : false , remote : { name : 'origin' } } , opts ) ; return driver . push ( opts ) // Can fail with NOT_FAST_FORWARD // TODO update remote branch in repoState list of branches . thenResolve ( repoState ) ; }
Push a local branch to a remote repository
@param {RepositoryState} repoState
@param {Driver} driver
@param {Branch} [opts.branch] Branch to push. Default to current
@param {String} [opts.remote.name=origin] Name of the remote
@param {String} [opts.remote.url] URL if the remote needs to be created
@param {Boolean} [opts.force=false] Ignore non fast forward
@param {String} [opts.auth.username] Authentication username
@param {String} [opts.auth.password] Authentication password
@return {Promise<RepositoryState>}
@throws {Promise<ERROR.NOT_FAST_FORWARD>}
@throws {Promise<ERROR.AUTHENTICATION_FAILED>}
@throws {Promise<ERROR.UNKNOWN_REMOTE>}
Push a local branch to a remote repository