Answer the question
In order to leave comments, you need to log in
`
Why does git rebase delete files?
Hello! Can you please tell me why the `git` command ` git rebase master
deletes 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
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 questionAsk a Question
731 491 924 answers to any question