7
- The branch
dev
is automatically merged to themaster
; this, for his time, there’s a deploy automatic application. - The branch
dev
has some changes ahead of the branchmaster
and will be disposed of. - The branch
feature
incorrectly left the workflow and was created to
from themaster
.
What I need to do is:
Delete the changes from
dev
and leave it as the master- Merge the
feature
indev
- Merge the
I thought to "reset" the dev
, erasing and creating it from the master
but I don’t know if this is the solution to these cases.
@Edit
After effecting the reset
, commit
and push
i get the following error because my branch dev
has changes saved in remote
.
hint: Updates Were Rejected because the tip of your Current branch is Behind
hint: its remote Counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing Again.
hint: See the 'Noteabout fast-forwards' in 'git push --help' for Details.
There is code in "dev" and/or "Features" that needs to be used?
– Sergio
The code in the branch
features
should remain, @Sergio– Marcelo de Andrade
If you just want to "go back to" with Features you could do
git reset --hard master
when you’re in the branchdev
and making agit fetch master
if it is remote to be updated in memory. So delete commits fromdev
which equals the master, and thefeatures
is 2 commits ahead of thedev
and ofmaster
.– Sergio
Is the code in dev really disposable? da para fazer também um
rebase
infeature
indev
so you lose nothing.– gmsantos
Yes, the commits of
dev
ahead of themaster
are disposable. @gmsantos– Marcelo de Andrade
@Sergio, I edited the issue with a forgotten detail about the branch
dev
– Marcelo de Andrade
your central repository is Bare?
– zwitterion
No, @zwitterion
– Marcelo de Andrade
That’s what I figured. That’s why you’re getting these error messages when you try to update between environments.
– zwitterion