Git Merge VS. Git Rebase - What's the difference?

Git Merge VS. Git Rebase - What's the difference?

Philipp Lackner

1 год назад

20,410 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Mateusz Nepath
Mateusz Nepath - 31.08.2023 20:42

git push --force

Ответить
Rich Friedel
Rich Friedel - 03.07.2023 18:27

Since rebase will rewrite the commit history, a good rule of thumb is to only rebase on branches that are fully in your control - ie. No one else is using that branch. Use merge if others are also working within the same branch.

If you do use rebase on a branch that other people are working with, make sure to communicate that to them so they know they will need to pull down and fix any merge conflicts. I like to stash my changes, pull the changes down and then unstash my previous changes so that I can minimize any conflicts.

Ответить
Arga Hutama
Arga Hutama - 03.07.2023 16:04

Merge, keep it simple stupid.

Ответить
Akash Sinha
Akash Sinha - 02.07.2023 19:52

Team cherry-pick

Ответить
Jesús Barrera Méndez
Jesús Barrera Méndez - 02.07.2023 10:48

Rebase is more flexible but it must be used with extra care.

Ответить
Vitalijus Kolinko
Vitalijus Kolinko - 29.06.2023 19:48

Merge

Ответить
Ibrahim khalil Shakir
Ibrahim khalil Shakir - 29.06.2023 19:23

Hey. Make a git tutorial. If you make it. It will be best tutorial 😊

Ответить
Mr Jackson
Mr Jackson - 29.06.2023 12:13

cherry-pick commits😅

Ответить
JongHun Park
JongHun Park - 28.06.2023 17:13

Work with a lot of people in a short period of time and are more likely to conflict -> Merge

Relatively few conflicts, and the commit history must be managed well. -> Rebase

Ответить
Dharamveer Gupta
Dharamveer Gupta - 28.06.2023 10:19

Rebase is always the best way to go.

Ответить
Huseynbaba Rzaquliyev
Huseynbaba Rzaquliyev - 28.06.2023 09:32

Hey there, I recommend to have both branches in the remote before rebasing them, because you cannot reset the rebase when there is a problem with your branches and rebase operation

Ответить
techkyguy
techkyguy - 28.06.2023 02:48

Rebase is what my team uses and is ok. You just need to know when to merge

Ответить
LaBoots 2772
LaBoots 2772 - 28.06.2023 02:04

rebase is OP when used correctly

Ответить
Christophe Cornet
Christophe Cornet - 27.06.2023 23:29

I tend to rebase

Ответить
Bbeniful
Bbeniful - 27.06.2023 22:06

I vote for rebase :D

Ответить
Tomas Havlicek
Tomas Havlicek - 27.06.2023 21:07

Team rebase

Ответить
Nikola Karovic
Nikola Karovic - 27.06.2023 20:30

Rebase is the best!

Ответить
StealerSlain
StealerSlain - 27.06.2023 19:31

If the goal is to have a really clean commit history, one should consider using squash and learning interactive rebases

Ответить
VectorAlphaAI
VectorAlphaAI - 27.06.2023 18:20

Neither. I dont use version control.

Ответить
samir gawas
samir gawas - 27.06.2023 18:18

Rebase

Ответить
MANSHAL KHATRI
MANSHAL KHATRI - 27.06.2023 18:00

I have seen rebase option many times but never used it

Ответить
Chimezie Orji-Unegbu
Chimezie Orji-Unegbu - 27.06.2023 17:58

Merge is always easier. Rebase most times generate more complex issues

Ответить
Adam Gardner
Adam Gardner - 27.06.2023 17:28

Most teams I have worked on go with merge as its simpler and safer. I do not trust myself and hard pass on deleting commit history. Seen people f up stuff with rebase.

Ответить
Abhimanyu N
Abhimanyu N - 27.06.2023 17:12

Single commit per MR/PR. Always rebase.

Ответить
yatish raja
yatish raja - 27.06.2023 16:51

I simply like merge but my team lead always says to rebase and create problems

Ответить
qweqwe qwewqe
qweqwe qwewqe - 27.06.2023 16:38

rebase is always a problem, one day the team lead just cut out a huge changes that I worked on for a week. had to restore all the lost files, while the packages created by me were preserved, it was very strange

Ответить
Maxi Mooze
Maxi Mooze - 27.06.2023 16:28

git reset --hard 🎉

Ответить
Jaydeep Bhayani
Jaydeep Bhayani - 27.06.2023 15:49

Rebase

Ответить
_0_o_
_0_o_ - 27.06.2023 15:36

Git rebase is a powerful feature 🔥🔥

Ответить
Amr Mohamed
Amr Mohamed - 27.06.2023 15:34

I would simply merge 😂. rebasing and fixing conflicts in each commit is a suicide 😂😂

Ответить