Working with the GitHub version control system has long been a standard for developers. GitHub Desktop simplifies this process by providing a convenient graphical interface for working with repositories. One of the new and useful tools is GitHub Copilot, which can now be used directly in GitHub Desktop to generate commit descriptions. This is especially useful when you need to quickly commit changes, but do not have time to formulate a detailed comment. Copilot can analyze the changes made to the code and offer an automatically generated commit description, which saves time and makes the change history more understandable.
The auto-description feature of commits works as follows: Copilot analyzes the changes in the diff and suggests a text that reflects the essence of the edits. For example, if you added a new method or fixed a bug in a certain module, Copilot will suggest a short title and an extended description. However, developers often need to slightly adapt this text to their working style. For example, you can ask Copilot to use shorter wording, add technical details, or vice versa — make the comment less dry and more descriptive. To do this, you just need to edit the generated text manually or give Copilot specific instructions. For example, you can formulate a hint like: “Make the description more detailed” or “Write the title in imperative form.” Copilot takes into account the context and adjusts the final result, allowing you to control the tone and style of the messages.
GitHub Copilot can generate a commit description, but to make it do it differently, you need to direct it a little. Here's how you can do that:
How to set Copilot to the desired commit description style
Add a comment to the commit message Before you click "Commit", in the description field you can write something like:
# Copilot, please describe this focusing commit on asset types and their purpose in gameplay.
Or:
# Copilot, summarize changes with emphasis on visual impact and UI integration.
Use a template or structure If you want the descriptions to be in a specific format, you can specify:
# Format: [Type] - [Purpose] - [Impact]
Clarify the context of the changes For example:
# These files are part of the new post-apocalyptic map background. Highlight that in the description.
Redefine the style If Copilot's writing is too dry or too technical, you can ask:
# Make the description more concise and user-facing, less technical.
If you want him to write something like:
"Added meta files for new MapBg sprites used in the map background. This improves the visual atmosphere and sets the scene for the next stage of UI integration."
You can write:
# Copilot, describe this commit as a visual enhancement for the map background, preparing for UI integration.
# Co-pilot, please describe all commits in the past tense
Game: Perform tasks and rest cool. 2145 people play!
Play gameGame: Perform tasks and rest cool. 2552 people play!
Play gameShaders are an essential part of any graphics-intensive application. Traditionally, shaders in Unity were created using...
Read moreShaders in Unity are a vital part of the visual design of games and applications, and understanding their principles ope...
Read moreTexture atlases and Texture Array in Unity are powerful tools for optimization and flexibility when working with texture...
Read more