Skip to content
Snippets Groups Projects
Select Git revision
  • 8.x-1.7
  • 8.x-1.x default
  • 7.x-1.x
  • 8.x-1.6
  • 8.x-1.5
  • 8.x-1.4
  • 8.x-1.3
  • 8.x-1.2
  • 7.x-1.2
  • 7.x-1.1
  • 8.x-1.1
  • 8.x-1.0
  • 7.x-1.0
13 results

gitinfo

  • Clone with SSH
  • Clone with HTTPS
  • lolandese's avatar
    Issue #3144338 by lolandese: Aggregate similar log and screen messages into one
    Martin Postma authored and lolandese committed
    535a2052
    History

    Formatted online version of this README

    https://www.drupal.org/project/gitinfo

    Summary

    An overview at ../admin/reports/gitinfo of fundamental Git info for all repos, from the project root to the deepest Git directory it detects. It highlights what needs attention, in that case resulting in a warning. It provides a quick insight for projects that contain one or more Git repositories. It is easier than searching for Git repos, then navigating to each of them in the terminal and executing long Git commands for each piece of info. Compared with the terminal or IDE use of Git, it has the additional ability to:

    • render information as a link, for example, click on a commit hash to see the diff
    • show 'time ago' timestamps to see at a glance how long ago a commit was made
    • tell if your local branch is behind the remote fetching first automatically (optional)
    • pull automatically if there are no conflicts (optional) to keep your repos up-to-date
    • track projects outside the current one, also non-Drupal (local or on a server, optional).

    Use cases

    Usage

    • Find the Git Info section in the Status Report at admin/reports/status with a summary.
    • Find the detailed info for all Git directories at admin/reports/gitinfo.
    • Settings can be configured at admin/config/development/gitinfo and the containing fields are self-explanatory.

    Requirements

    Provides per Git directory

    • remote URL (linked to the repository) and optionally a warning if the working directory is behind, actively making a connection with the remote repo
    • status: Current branch, untracked files and local file changes
    • the tag of the last stable version
    • last commit list dated (time ago) and with the commit hash that links to the commit
    • a list of commits on the remote that are not on the local branch (behind)
    • status: The changed files and directories, neatly listed with a fuzzy timestamp (time ago)
    • ignored or skipped existing directories and files
    • the Git submodules it contains
    • list of stashes with a fuzzy timestamp (time ago) and stash name.

    On your local development environment, changed files indicate you have to stage (with git add), commit or push your work. In the report, it is all pointed out. If you find (not ignored) changed files on your server it usually means trouble (including hacking attempts) as they should all have been deployed under version control. The sites/*/files directory and similar are in the .gitignore file. It is recommended to have the complete Drupal project under Git version control to detect any changes. Use git init on it if this is not the case. It is usually one level above the Drupal root (the directory named web or docroot) and contains apart from that also the project's composer.json file and consequently the vendor directory.

    How to define directories outside the project root

    To track a non-Drupal project or to monitor multiple projects (also in VMs), read the documentation for instructions.

    Troubleshooting

    See documentation.

    Setting it up only on the development environment

    See documentation for instructions.