skip to content
Ivan's wiki
Site Tools
Search
Tools
Show pagesource
Backlinks
Recent Changes
Media Manager
Sitemap
>
Recent Changes
Media Manager
Sitemap
git-merging
This page is read only. You can view the source, but not change it.
# Git merging **Merging** combines two branches. Switch to the target branch (usually `main`) and run `git merge <feature-branch>` to integrate changes. If git can automatically merge without conflicts, it creates a merge commit. If there are conflicts, you must resolve them manually before committing. ```bash $ git checkout main # switch to target branch $ git merge feature-branch # merge feature-branch into main $ git merge --abort # cancel a merge if conflicts arise ``` A **merge commit** is a special commit with two parents: the old tip of main and the tip of the feature branch. It represents the point where two lines of development converged. Merge commits preserve history and make it clear when features were integrated, but they can clutter the log on frequently-merged branches.
Page Tools
Show pagesource
Backlinks
Back to top