简体   繁体   中英

Merge git --squash branch into master does not appear in gitlab website?

I merged my development branch called SGMII with the --squash option into the master branch as followed:

git checkout master
git pull origin master
git merge --squash SGMII
git commit -m "merge SGMII into master"
git push

However, when checked it on the gitlab website, it does not display the merge:

gitlab-graph

In addition, the SGMII branch is not marked as merged . Do you have any idea why they are not consistent?

You can see a git merge --squash illustrated here : it does not produce a merge commit.

Produce the working tree and index state as if a real merge happened (except for the merge information), but:

  • do not actually make a commit,
  • do no move the HEAD , or
  • do not record $GIT_DIR/MERGE_HEAD (to cause the next git commit command to create a merge commit).

Therefore, the SGMII branch and the master should be equal (and in fact, they are). But the compare marks it differently.

If master is properly configured, the git push command should have pushed the local master to its remote GitLab repository origin/master upstream branch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM