U
U
user_of_toster2021-09-16 06:26:20
git
user_of_toster, 2021-09-16 06:26:20

Merge vs Rebase - which is better to use?

There is a common main branch, there is a personal feature / id. New commits are always pushed to feature/id.

There is a need to pull commits from the master. I see two options:

git rebase main
git push -f

git merge --squash main
git push


Which option is better to use? Are there other options? Like rebase,but don't likepush -f.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2021-09-16
@user_of_toster

Vkusovschina, personally I like merge more. At least the fact that conflicts with the master can be fixed once without squats. With a rebase, fixing conflicts, especially if the same piece of code has changed more than once, is a pain. Now we have merging prohibited, there is only a rebase, and I suffer :(
Force push to my branch is the norm, there is nothing wrong with that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question