Where does git reboot take place

The git documentation is not clear enough about this, but everyone on the Internet seems to be aware of this.

Let's say now I'm in the function branch feature/test. If I do git rebase master, where is the permutation done? On the feature branch or on the main branch? I.e. which one is changing? Does it have the same syntax as git mergein how the current branch changes? In that case, do I need to go back to masterand merge with my function branch?

Edit: what I want to do is to merge (in this case rebase) the branch masterinto my function branch, and then merge the function branch back to master.

+4
source share
1 answer

As you reload your feature/teston master, the branch feature/testwill change. For instance.

           master
           |
           V
A----B-----C
      \
       D----E
            ^
            |
            feature/test

After doing

git checkout feature/test
git rebase master

your repo will look like this

            master
            |
            V
 A----B-----C----D'----E'
                       ^
                       |
                       feature/test

Note that D'! = D, Because he now has a new parent. However, it contains the same changes.

EDIT:

And how can I accept changes from a function / test back to the wizard?

Since it feature/testis in accordance with master git, it simply redirects the main branch.

git checkout master
git merge feature/test

will result in

                       master
                       |
                       V
 A----B-----C----D'----E'
                       ^
                       |
                       feature/test

See Git-Branching-Basic-Branching-and-Merging for more information.

+4
source

All Articles