Git has a habit of taking the easy route when it can. Fast forward merges move the branch pointer and call it a day. If you prefer your feature work to have a visible spine and not fade into the main timeline like a mystery subplot then use a no ff merge. This forces Git to create a merge commit that ties the feature branch back to main with two parents and a clean, auditable node in the graph.
In plain terms a normal fast forward happens when main has no new commits since the branch point. Git simply advances the main pointer and nobody notices the branch ever existed. A git merge --no-ff overrides that shortcut and creates a dedicated merge commit that lists both the main tip and the feature tip as parents. The commit graph then shows the feature as a bounded set of commits instead of a linear extension.
git checkout main
git merge --no-ff feature
git log --oneline --graph --decorate
Run that log command and you will see the merge commit with two parents. The graph view makes the separation obvious and answers the eternal workplace question about why that extra commit was added.
Use descriptive merge messages so the merge commit actually tells a story. Name your feature branches clearly and keep changes scoped. If group level context matters then opt for no ff. If you want the absolute minimal history then let fast forward do its thing for short lived edits.
You can think of no ff merges as putting a helpful signpost in your repository that says feature starts here and ends there. It makes the timeline a little fuller but gives you a much better map when somebody asks what happened and why. Or when a future you needs to undo that bright idea from two months ago and wants to do it without crying.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.