how to includeJsFile in head instead of body
You can use the getFootHtml function to tell Craft where to output HTML queued up with includeJsFile and includeJs. You'd normally have that tag somewhere at the end of your &lt;body&gt;. But all it does is to get all queued up HTML and output it, so if your JS are already "included", you can use it in &lt;head&gt;.

Another thing you could do is to not use the includeJsFile function to add the HTML to the &lt;head&gt;, but use a different approach. Here's an example using a var and an example using a dedicated Twig block:

index.html

{% extends 'base.html' %}

{% set headHtml = '&lt;script src="{{ url('assets/javascripts/myscript.js') }}"&gt;&lt;/script&gt;' %}

{% block head %}
    {{ parent() }}

    &lt;!-- Scripts --&gt;
    &lt;script src="{{ url('assets/javascripts/myscript.js') }}"&gt;&lt;/script&gt;
{% endblock %}


base.html

&lt;head&gt;
    {% block head %}
        &lt;!-- Document head --&gt;
        &lt;meta charset="utf-8"&gt;

        {% if headHtml is defined %}
            &lt;!-- Scripts --&gt;
            {{ headHtml }}
        {% endif %}
    {% endblock %}
&lt;/head&gt;