Ir al contenido principal

Intellectual Property and Git

Software Engineering Guide

Intellectual Property and Git: Avoiding AI Co-authored-by

Due Diligence AI Agents Git Hooks
High-end laptop hardware setup for AI code generation

Maintaining a 100% human history is key to the legal health of your source code.

"A golden rule in modern development: the commit message should reflect 'why' the change was made for the business, never 'how' or which tools were used to write it."

1 Legal Context: Why the Concern?

More and more startups and independent developers are facing an invisible problem: patent and copyright offices in the US and EU have determined that AI cannot hold copyrights. Only human creation is protectable.

The Danger in Audits (Due Diligence):

When a startup seeks investment or is about to be acquired, it undergoes a strict code audit. If the Git history shows bots as co-authors, investors can argue the company doesn't own 100% of its core technology, devaluing the project.

2 Configuring CLIs and AI Agents

Modern tools like Claude Code, Codex, GitHub Copilot CLI, or Gemini CLI often include automatic signatures. The best way to prevent this is by using system instruction files in your project root to force the agent's behavior.

Instructions to Inject:

Create files such as agents.md, claude.md, .cursorrules, or .github/copilot-instructions.md and include this block:

# Git Commits
- Do NOT add `Co-Authored-By` lines to commit messages.
- Write clear, descriptive commit messages in English.
- Use conventional commit style (feat:, fix:, chore:, etc.).

3 Agents on the GitHub Platform (Web)

If you use the Copilot agent integrated directly into GitHub.com Pull Requests, clicking "Squash and merge" forces an unerasable blue notice assigning co-authorship to the bot.

How to Avoid it in the UI:

To break this automatic assignment, you must perform at least one manual (human) commit on that branch before merging it (e.g., adjusting a comment or a space). Upon detecting your intervention, GitHub will give you primary authorship, allowing you to manually delete any AI traces in the merge text box.

4 Expert Pro-Tip: Using a Git Hook

The most robust, definitive, and professional solution is using a Git Hook. It is excellent because it is agnostic (it doesn't matter which AI you use tomorrow), invisible (it doesn't affect your workflow), and automatic.

commit-msg Script:

Create a file named commit-msg in your .git/hooks/ folder, give it execution permissions (chmod +x), and add this Bash code. It will intercept and clean the message before it's saved:

grep -iv "Co-authored-by:" "$1" > "$1.tmp" && mv "$1.tmp" "$1"

5 Oops... Already Sent the Commit?

If you check your history and realize the AI already signed a commit you just made, don't panic! You can rewrite the history locally to claim ownership of the code before it becomes permanent on the main branch.

Rescue Commands:

1. Open your terminal and run: git commit --amend --reset-author (Save and close the editor that appears).
2. Upload the changes by forcing an overwrite on the server: git push origin branch-name --force.

Protect the Value of Your Software

AI is an excellent assistant, but responsibility, design, and final authorship must always be 100% human.

CLEAN CODE. SECURE HISTORY.

Comentarios

Entradas populares de este blog

How to Use the Tab Key to Accept Github Copilot Suggestions

How to Use the Tab Key to Accept Github Copilot Suggestions After installing Copilot in Visual Code, I've installed the following extensions: GitHub Copilot, GitHub Copilot Chat, and GitHub Copilot Tool Pack, as shown in the attached screenshot. The Problem: After installing and configuring it with my Copilot account, when a completion suggestion appears, pressing Tab doesn't autocomplete it. To accept Copilot suggestions with the Tab key in VS Code, follow these steps: Step 1: Open Keyboard Shortcuts JSON Press Ctrl + Shift + P and type "Open Keyboard Shortcuts (JSON)" to open the keybindings.json file. Step 2: Add the Tab Key Binding Add the following code to the keybindings.json file: [ { "key": "tab", "command": "editor.action.inlineSuggest.commit", "when": "textInputFocus && inlineSuggestionHasIndentationLessThanTabSize && inlineSuggestion...

Coding at 30,000 Feet: Replacing Copilot with LM Studio

Next-Gen Development Bye GitHub Copilot: Setup Your Own Local AI C# Software Development 6 min read Coding at 30,000 feet: Independent, private, and powerful. "Picture this: You’re on a flight to Mallorca . You open your laptop, the cabin is quiet, and inspiration strikes. But there is no Wi-Fi, and your cloud-based AI tools are useless. By hosting your own LLM, you don't just gain privacy: you gain operational freedom ." Worried about code privacy or rising subscription costs? In 2026, the era of local LLMs has arrived. Setting up a local environment allows you to use specialized models like DeepSeek or Qwen which, in many cases, outperform generic models in specific programming tasks, offering a precision that cloud-based Copilot simply cannot match offline. 1 Step 1: The Brain (LM Studio) Model Selection Search ...

Context Engineering: How to Make AI Actually Useful

AI Strategy & Implementation Context Engineering: Making AI Actually Useful Workflow Optimization 5 Min Read Coding at 30,000 feet: Independent, private, and powerful. "Everyone is talking about AI agents, but they often feel like a brilliant new hire who doesn't know how things work internally. They have the potential, but lack the context. The fix isn't a better model—it's better context engineering. " Think of context as the ultimate instruction manual. Without it, the AI is guessing; with it, it becomes a specialist integrated into your real-world workflow. 1 The 4 Pillars of Context 📋 Operational Rules The "How-To" of your company. Define approval processes and hard limits. Example: "Never approve expenses >$500 without manager review." 🧠 Domai...