Skip to content

Conversation

@rolftimmermans
Copy link

When the branch that is to be checked out on deployment is the master branch (which is very useful for development or QA environments), a number of git errors occur on vd setup.

Example:

Deploying test22...
Password: 
Cloning into example.com-preview...
fatal: git checkout: branch master already exists
error: pathspec 'origin/master' did not match any file(s) known to git.
Already on 'master'
Running post script...
Running rake deploy:post_setup...

Results:
test22 => succeeded.
Total: 1 deployment, 1 success, 0 failures.

Even though the deployment succeeded, the error messages are quite confusing. Especially since one error message reads "fatal", though it's not fatal at all (from the point of view of Whiskey Disk)!

This patch fixes this issue by avoiding any git checkout actions if the recently cloned git repository equals the branch that we want to have. It should avoid much confusion for people that attempt to deploy their master branch.

Thank you for creating Whiskey Disk -- it's been a pleasure to use!

@gbirchmeier
Copy link

So I'm seeing this problem today, and this proposed fix is 8 months old. Anything happening on this one?

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

Successfully merging this pull request may close these issues.

2 participants