Announcement

Collapse
No announcement yet.

Trouble with blanks on diff/merge

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble with blanks on diff/merge

    Hi, I'm nearby a Newby, but I use git some months.
    My job will be, helping two other users working with our project.
    First time I have to manage the branching. To reduce the error rate, I create a sandbox for testing. All works fine.
    Now I want lay my hands on our big repository.
    There are 2 branches: master and development.
    The master branch is published and development is only visible in a private area.
    It seems to be, that a guy, that go away, have update master to a new version.
    I want clear ALL differences, including blanks, tabs...
    Okay. What is the problem?
    I have set up a ubuntu 18.02 with all needed tools to build my own area for working, testing an manage the repository.
    Now I check the branches and some differences will be listet, like;

    $ git checkout development
    ...
    $ git diff development master
    ...
    -// some text
    + // some text
    ...


    Okay, no critical diffs listet, automatic merge should be run successfully. But wtf is that:

    $ git merge master
    up to date.
    $


    I tried to find some help, but can find only the contra position. Im my work with git on other machines like Windows, I'm some times been confronted with this trivial things. Git have all time consider this differences and make a commit from thius differences.
    What is the reason why, Git no merge this differences, even though git diff find that?
    Here is my

    $ git config --list
    diff.tool=meld
    difftool.prompt=false
    difftool.meld.cmd=meld $LOCAL $REMOTE
    merge.tool=meld
    mergetool.meld.cmd=meld $LOCAL $MERGED $REMOTE --output $MERGED
    credential.https://....git.beanstalkapp.com.username=gitusername
    color.ui=auto
    user.email=gitusername@server.de
    user.name=gitusername
    core.repositoryformatversion=0
    core.filemode=true
    core.bare=false
    core.logallrefupdates=true
    remote.origin.url=https://....git.beanstalkapp.com/liebesschloss.git
    remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
    branch.master.remote=origin
    branch.master.merge=refs/heads/master
    branch.development.remote=origin
    branch.development.merge=refs/heads/development


    Anyone can support me?

  • #2
    In general, a "merge" makes sure that all changes made to the source branch(es) are incorporated into the target branch. That does *not* mean that the 2 (or more) branches will end up identical - and they normally will not (since there can/will be changes made to the destination branch that are not modified by the merge).

    The purpose of the "diff" is to show the differences between 2 (or more) refs (when you provide the 2 branch names that is a shorthand for the HEAD commit on each branch). So it will show those changes (as you can see).

    Since your goal is to "I want clear ALL differences, including blanks, tabs...)" (I assume between the 2 branches), then you will need to consecutively merge first from master into development and then from development into master. As long as no other commits are allowed during this process to either branch then the 2 branches should end up the same.

    Comment

    Working...
    X