Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I have a doubt about the functionality of Drush Features commands when it works with git:

Before I do a git pull, can I do drush fu example? Will this command overwrite the changes of the feature coming with the pull and drush fr example will not work properly?

Thank you.

share|improve this question

2 Answers 2

Your question is equivalent to asking if you can edit a file before doing a git pull. The answer is yes, but if there are conflicts, then you will need to merge them.

Returning to your example, if there are no changes to your local configuration, then the files that drush fu will write will be the same as the files currently in the repository. In this instance, git will happily do the pull, as it will consider the files to be unchanged, even if drush fu rewrote them.

If you do have changes (git status after drush fu will show this), then it would be a good idea to run git stash prior to git pull. After you pull, git stash pop will overlay your stashed changes on top of the pull, and you can see what the conflicts are.

Disclaimer: I have never hand-merged conflicts from features. I always pull the database from live to dev, and push code from dev to live to avoid this.

share|improve this answer

We have developed Kraftwagen which is specifically aimed at making Drupal projects more 'version control friendly'. The main win is that you only commit code that you wrote; the codebase of Druapl and modules are kept out of the repo.

Please have a look and let us know what you think of it!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.