Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitcommit CWD doesn't seem to work properly #105

Open
camsjams opened this issue Apr 4, 2015 · 3 comments
Open

gitcommit CWD doesn't seem to work properly #105

camsjams opened this issue Apr 4, 2015 · 3 comments

Comments

@camsjams
Copy link

camsjams commented Apr 4, 2015

Using this config:

grunt.initConfig({
    gitcommit: {
        'default': {
            options: {
                message: 'test',
                cwd: '../../builds/'
            },
            files: [{
                src: ['release.tar'],
                expand: true,
                cwd: '../../builds/',
            }]
        }
    }
})

It fails to commit as the resulting action is to make the CWD = ../../builds/ as expected, but then tries to find the file as ../../builds/release.tar, which throws a fatal error in the git command due to files being used outside the working directory (of git).

Any ideas about how to get around this?

@barkoczi
Copy link

barkoczi commented Oct 9, 2015

Same problem here. My project folder structure looks as following:
/project/frontend - here is my Gruntfile.js and my frontend html app
/project/webapp - here is my backend application.
Each folder has an own git repo.

My build process copies files from /project/frontend/app to /project/webapp/frontend .

I want to git add and git push for both repo. But when I set the options.cwd : <%= yeoman.dist %> (which points to /project/webapp) then I receive the following error message:
Running "gitadd:build" (gitadd) task fatal: ../webapp: '../webapp' is outside repository

How can I git add/commit/push any git repo outside my Gruntfile.js folder?

@dominikwilkowski
Copy link

same issue here... 👍 for a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@camsjams @dominikwilkowski @barkoczi and others