分享

git merge

 兰亭文艺 2019-03-23
The "merge" command is used to integrate changes from another branch.

The target of this integration (i.e. the branch that receives changes) is always the currently checked out HEAD branch.

While Git can perform most integrations automatically, some changes will result in conflicts that have to be solved by the user. Read more about Dealing with Merge Conflicts in our online book.

Important Options

--no-ff

Creates a merge commit even when a fast-forward would be possible.

--squash

Combines all integrated changes into a single commit, instead of preserving them as individual commits.

--abort

When a conflict occurs, this option can be used to abort the merge and restore the project's state as it was before starting the merge.

Usage Examples

Before using "git merge", make sure the correct local branch is checked out. Then, to perform the merge, simply specify which branch's commits you want to integrate:
git checkout develop
git merge feature/login


https://www./learn/git/ebook/en/desktop-gui/advanced-topics/merge-conflicts#start

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多