Merging
In all of the following, a merge strategy can be specified by the "-s strategy" argument, which can be one of: "resolve", "recursive", "octopus", "ours", or "subtree". If you tried a merge which resulted in a complex conflicts and would want to start over, you can recover with "git reset --hard". If you accidently merged and want to unmerge, you can "git reset --hard ORIG_HEAD".
- git merge branch
-
Merge branch branch into the current branch and commit the result. This command is idempotent and can be run as many times as needed to keep the current branch up-to-date with changes in branch.
- git merge branch --no-commit
-
Merge branch branch into the current branch, but do not autocommit the result. Allows for inspection or tweaking of the merge result before committing.
- git merge branch --squash --commit
-
Merge branch branch into the current branch as a single commit.