# Open for git repository questions

**URL:** <https://metaruby.com/t/open-for-git-repository-questions/508>\
**Category:** General Programming\
**Created:** [May 14, 2016, 3:33am UTC](https://metaruby.com/t/open-for-git-repository-questions/508 "2016-05-14T03:33:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [May 14, 2016, 3:33am UTC](https://metaruby.com/t/open-for-git-repository-questions/508/1 "2016-05-14T03:33:05Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [May 14, 2016, 11:17am UTC](https://metaruby.com/t/open-for-git-repository-questions/508/2 "2016-05-14T11:17:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [May 14, 2016, 12:01pm UTC](https://metaruby.com/t/open-for-git-repository-questions/508/3 "2016-05-14T12:01:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kofno](https://metaruby.com/user_avatar/metaruby.com/kofno/32/159_2.png) [@kofno](https://metaruby.com/u/kofno)\
**Post date:** [May 14, 2016, 12:56pm UTC](https://metaruby.com/t/open-for-git-repository-questions/508/4 "2016-05-14T12:56:07Z")

</div>

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/](https://help.github.com/articles/closing-issues-via-commit-messages/)

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [May 14, 2016, 1:16pm UTC](https://metaruby.com/t/open-for-git-repository-questions/508/5 "2016-05-14T13:16:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [May 15, 2016, 6:48am UTC](https://metaruby.com/t/open-for-git-repository-questions/508/6 "2016-05-15T06:48:17Z")

</div>

Has anyone written any git hooks before? I’m looking to write a [pre-push](https://github.com/git/git/blob/master/Documentation/githooks.txt#L181) 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?

---

<div class="post-metadata">

**Author:** ![danielpclark](https://metaruby.com/user_avatar/metaruby.com/danielpclark/32/823_2.png) [@danielpclark](https://metaruby.com/u/danielpclark)\
**Post date:** [May 15, 2016, 11:02am UTC](https://metaruby.com/t/open-for-git-repository-questions/508/7 "2016-05-15T11:02:17Z")

</div>

> [@danielpclark](#):
>
> 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

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