rubenv / grunt-git

Git commands for grunt.
MIT License
227 stars 83 forks source link

Pushing to branch other than master fails #129

Open JBCSU opened 7 years ago

JBCSU commented 7 years ago

When I try to push to a branch other than master, I get the following error:

Running "gitpush:server-production" (gitpush) task
Verifying property gitpush.server-production exists in config...OK
File: [no files]
Options: all=false, upstream=false, tags=false, force, remote="git@code.stanford.edu:ucomm/homesite-2017-deploy.git", branch="aws/prod", verbose, cwd="dev/deploy"
Options: verbose, cwd="dev/deploy", remote="git@code.stanford.edu:ucomm/homesite-2017-deploy.git", branch="aws/prod", force
error: src refspec aws/prod does not match any.
error: failed to push some refs to 'git@code.stanford.edu:ucomm/homesite-2017-deploy.git'
Warning:  Use --force to continue.

Aborted due to warnings.

Here are my options for gitpush:

    "server-production": {
        options: {
            cwd:    '<%= pkg._deploypath %>',
            remote: '<%= pkg._production_git_repo %>',
            branch: 'aws/prod',
            force:   true
        }
    }

When I change the branch from aws/stag to stag I get the same error. When I change the branch to master, the push works:

Running "gitpush:server-production" (gitpush) task
Verifying property gitpush.server-production exists in config...OK
File: [no files]
Options: all=false, upstream=false, tags=false, force, remote="git@code.stanford.edu:ucomm/homesite-2017-deploy.git", branch="master", verbose, cwd="dev/deploy"
Options: verbose, cwd="dev/deploy", remote="git@code.stanford.edu:ucomm/homesite-2017-deploy.git", branch="master", force
Everything up-to-date

Done.

I've tried this with both Node 4.4.7 and 5.12.0 and I get the same behavior.

Any help would be greatly appreciated. I'd really like to be able to push to branches other than master.