`Why does git rebase delete files?
C
C
cester2018-05-16 11:48:29
git
cester, 2018-05-16 11:48:29

Why does git rebase delete files?

Hello! Can you please tell me why the `git` command ` git rebase masterdeletes files that have been created, committed and already pushed to gitlab?
Very strange behavior, who faced this, please tell me what could be the problem.
Merge request is quite large.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-05-16
@sergey_kzn

I suspect that you need to understand exactly how rebase works.
When executing git rebase master, git will do this:
This is an example rebase behavior.
In your case, I suspect there are conflicts, so git does not reach those commits where the files you need appeared. If the conflict is resolved and done , the process will continue. By itself, rebase does not imply deleting any files, only applying commits. And so rightly noticed that you should not do a rebase of an already published branch. git rebase --continue

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question