Answer the question
In order to leave comments, you need to log in
How to properly update a branch in Git?
Hello.
I recently found out that git rebase changes commits, which is why you can’t do a rebase if a push was made to a public repo.
There was a question, but how to update the branch?
If I am working on branch A and I understand that I need to make a fix to the project. I create a new branch from say dev branch, make a fix. And I send this fix to the public repository. How, in this case, to update branch A so that it contains a new fix?
Answer the question
In order to leave comments, you need to log in
if you do a rebase, for example, 5 commits and try to merge it into the master branch, then you will have 5 identical commits (by changes)
, that is, if you have already pushed the fixes, the next commits go
if you work with a small team, then you can agree to rebase in branches with features, but after merging it into the master, it’s still better not to rewrite the commit history
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question