Open for git repository questions

Ask any question related to git repository management.

My first question.

@Ohm How did you submit a pull request that would close the issue it was related to when merged? Both of your recent pull requests have done that and I’ve never managed that before.

Don’t you just include Resolves #12345 where #12345 is the issues number?

Do you put that in the commit message? Is the word “Resolves” required? Because I’ve referenced issue numbers in the past but I don’t ever remember it closing the issue upon merge of the pull request.

Doesn’t have to resolves. Can be fixes, or closes, or bunch of others. Here’s the blog post from github. https://help.github.com/articles/closing-issues-via-commit-messages/

1 Like

Ah. That’s why. I didn’t use one of the dozen keywords for it. Thanks!

Has anyone written any git hooks before? I’m looking to write a pre-push hook that updates the README of the build status of a sub-directory. I’ve already written the test suite for multiple sub-directories and updating their badge statuses in the README. I just need to figure out how to get the directory names of where things have been changed to run specific tests with a hook pre-push.

Any help?

###ANSWER
git diff $(git remote)/master --name-only