Why Git Is Not For Robots

Git is a great tool for version control in software development but automating commits or the modification of history causes problems for traceability, security, and usability.Git lets developers work independently and combine their work quickly and ef…


This content originally appeared on Level Up Coding - Medium and was authored by Ben Brazier

Git is a great tool for version control in software development but automating commits or the modification of history causes problems for traceability, security, and usability.

Git lets developers work independently and combine their work quickly and efficiently whilst retaining change history. With the increased use of GitOps there are more and more developers using automation to run commands on git commit. This is a useful tool but can become problematic when the automation pushes changes back into git.

Git is Not for Robots

Traceability

One of the main purposes of using Git is to keep track who made changes and when they occurred. This traceability is useful to improve communication within teams and to give context for code changes, as well as providing the ability to access previous versions of code.

Loss of Traceability

When automating changes to a code base traceability is lost, because instead of seeing the user that made the last changes it shows a bot or shared credential. This leads to lost information about who made the change unless you proxy the user’s credentials, which isn’t advisable due to security concerns.

Security

Git allows you to restrict access control per user, which is important when managing your businesses source code. The source code should be considered high security as it can represent your competitive advantage over other companies.

Loss of Security

When you allow automation to modify code, anybody who can control this automation can avoid the security controls of Git. This is an additional risk and attack surface area that should be considered before implementation.

Usability

Merge conflicts in Git need to be resolved by humans as it is too complex to resolve them with automation. There are work arounds for resolving merge conflicts, but these can lead to lost code and broken builds.

Force Push

Since automation has no ability to resolve merge commits it leads to the use of force pushing, which overwrites any other user’s changes. Frequent modification of code by automation can also cause problems as users will need to constantly pull the changes in order to avoid merge conflicts.

Summary

Running automation from Git is a great way to trigger pipelines but it is important that automation only has read access and doesn’t push changes back into the system. This is why Git is for humans and not for robots.

Follow me here for more content or contact me on:


Why Git Is Not For Robots was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Level Up Coding - Medium and was authored by Ben Brazier


Print Share Comment Cite Upload Translate Updates
APA

Ben Brazier | Sciencx (2022-06-15T11:43:27+00:00) Why Git Is Not For Robots. Retrieved from https://www.scien.cx/2022/06/15/why-git-is-not-for-robots/

MLA
" » Why Git Is Not For Robots." Ben Brazier | Sciencx - Wednesday June 15, 2022, https://www.scien.cx/2022/06/15/why-git-is-not-for-robots/
HARVARD
Ben Brazier | Sciencx Wednesday June 15, 2022 » Why Git Is Not For Robots., viewed ,<https://www.scien.cx/2022/06/15/why-git-is-not-for-robots/>
VANCOUVER
Ben Brazier | Sciencx - » Why Git Is Not For Robots. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/06/15/why-git-is-not-for-robots/
CHICAGO
" » Why Git Is Not For Robots." Ben Brazier | Sciencx - Accessed . https://www.scien.cx/2022/06/15/why-git-is-not-for-robots/
IEEE
" » Why Git Is Not For Robots." Ben Brazier | Sciencx [Online]. Available: https://www.scien.cx/2022/06/15/why-git-is-not-for-robots/. [Accessed: ]
rf:citation
» Why Git Is Not For Robots | Ben Brazier | Sciencx | https://www.scien.cx/2022/06/15/why-git-is-not-for-robots/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.