Master Git Reset, Rebase, and Cherry-Pick
Master advanced Git commands (reset, rebase, cherry-pick, stash) with clear diagrams and practical scenarios.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
Tu es un expert Git avec une pédagogie claire pour expliquer les commandes avancées. Je connais les bases de Git (add, commit, push, pull, branch, merge) mais je veux maîtriser les commandes plus puissantes que j'utilise rarement par peur de les comprendre mal.
Mes problèmes actuels :
- Je ne sais pas quand utiliser rebase vs merge
- git reset me fait peur, je confonds --soft, --mixed et --hard
- Je n'ai jamais utilisé cherry-pick mais j'en ai besoin
- Je ne comprends pas bien git stash et ses options
Explique-moi ces commandes avec des schémas et des cas d'usage concrets :
-
git reset : explique la différence entre --soft, --mixed et --hard avec des schémas ASCII montrant l'état du working directory, de l'index et de HEAD avant et après. Donne un cas d'usage typique pour chacun.
-
git rebase : explique la différence fondamentale avec merge (schéma comparatif), le rebase interactif (git rebase -i) pour squash, reword, fixup avec un exemple concret d'utilisation avant un PR.
-
git cherry-pick : explique le concept avec un schéma, les cas d'usage typiques (backport de bugfix, récupérer un commit sur la mauvaise branche) et les pièges (conflits, commits dupliqués).
-
git stash : les différentes options (--include-untracked, --patch, stash pop vs apply, stash list), et quand préférer stash vs une branche temporaire.
-
Scénarios pratiques : 3 scénarios de la vraie vie avec la suite de commandes exacte à exécuter pour les résoudre.
-
Quand utiliser quoi : un tableau de décision rapide.
Personalize this prompt with Léa
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
<p>This prompt is designed for developers who know Git but avoid certain commands due to lack of confidence. By requesting ASCII diagrams for git reset, the prompt forces the AI to make visual the state changes (working directory, index, HEAD) that are often explained only in text, thus poorly understood.</p><p>Requesting concrete use cases for each command is fundamental: many developers know the syntax of git rebase -i without knowing in which situation to apply it. Contextualization in real scenarios (cleaning commits before a PR) is what transforms theoretical knowledge into practical competence.</p><p>The final decision table ('when to use what') is the most immediately useful deliverable: it allows quickly finding the right command in the heat of the moment, without having to reread the complete explanation each time.</p>
Use Cases
Expected Output
Detailed explanations with ASCII diagrams, concrete use cases, solved practical scenarios, and a decision table for each command.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
- LéaAI
Pour `git rebase -i`, ajoutez `exec make test` (ou `exec npm test`) entre les commits pour valider automatiquement chaque étape. Cela évite de casser l’historique lors d’un squash ou d’un reword.
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Similar Prompts
Midjourney Prompt for Creating a Chatbot
Midjourney has become an essential tool for designing a chatbot's visual identity. Whether you're developing a virtual assistant for customer service, a conversational bot for your e-commerce site, or an AI companion for a mobile app, your chatbot's appearance plays a crucial role in user engagement. A well-designed avatar inspires trust, humanizes the interaction, and reinforces your brand image. With Midjourney, you can generate avatars, conversational interfaces, mascots, and UI visual elements without needing graphic design skills. The right prompts let you create visuals consistent with your brand guidelines, from accessible cartoon styles to clean corporate designs. In this guide, you'll find optimized prompts to generate all the visual assets your chatbot needs: main avatar, emotion variations, stylized speech bubbles, and welcome screens. Each prompt has been tested and refined to produce professional results you can use directly in your development projects.
Encryption at rest and in transit
Securing data at rest and in transit
DALL-E Prompt for Generating SQL Queries
DALL-E, the image generation model developed by OpenAI, might seem like an unexpected choice for working with SQL queries. Yet, it proves to be a powerful tool for creating visual representations of database schemas, relational diagrams, and SQL query flows. By visualizing your data structures as clear, educational images, you make it easier to understand table relationships, complex joins, and database architectures. Whether you're a trainer looking to illustrate a course, a developer wanting to visually document a database, or an analyst preparing a presentation, DALL-E lets you transform abstract SQL concepts into immediately understandable visual schemas. This visual approach perfectly complements traditional code generation tools by offering a graphical dimension that text alone cannot convey. Discover how to formulate your prompts to obtain professional database diagrams and exploitable visual representations of SQL queries.
Terratest for Terraform Modules
Testing Terraform Modules