Updated Git checkout to silence detached head warnings.

Avoids displaying the following warning in the logs when checking out a
specific version of a project for install purposes:

    You are in 'detached HEAD' state. You can look around, make
    experimental changes and commit them, and you can discard any
    commits you make in this state without impacting any branches by
    performing another checkout.

    If you want to create a new branch to retain commits you create,
    you may do so (now or later) by using -b with the checkout command
    again. Example:

      git checkout -b <new-branch-name>

    HEAD is now at f836f876a178 Added version release changes.
This commit is contained in:
Brooke Kuhlmann
2018-07-31 17:41:00 -06:00
parent d0c2335f35
commit f6610849eb

View File

@@ -148,7 +148,7 @@ install_git_project() {
git clone "$repo_url"
(
cd "$project_dir"
git checkout "$repo_version"
git -c advice.detachedHead=false checkout "$repo_version"
eval "$script"
)
rm -rf "$project_dir"