0
I have a very strange situation (probably vacilo right...) here in my repository.
I have a branch of DEV
and several other of Features and bugs.
With each branch of Feature or bug, we merge with branch DEV
.
We worked on 2 Devs on this project, me, always before doing the merge
, make a pull
in the Dev branch. Ai then do the merges. The other dev apparently did one git fecth
before merging, I have no idea if it implied anything, but some of the branches I had already merged into DEV simply don’t feature the code in the DEV branch.
I turned the remote git log -all
, which, if I understand correctly, shows the branchs that are part of the currently selected branch, so with the DEV branch selected, when running this command, there are the branchs whose codes are missing.
I need to understand what we did wrong...
I have the "lost code" in the respective branchs (local and remote), so I selected one of the branchs and when trying to merge again, gives a message saying that it is updated (Already up to date.
)
Anyone can help?
Private server, Github or similar?
– Jonathan de Toni
Local is local, remote is remote, in remote vc can have branchs that do not exist in remote and vice versa, there is not much q help, maybe you looking back the log until you see the point that such missing branch no longer "exist" or be "logged in".
– Guilherme Nascimento
private bitbucket @Jonathandetoni
– Quati_Maldito
Maybe I expressed myself badly @Guilhermenascimento, it was not the branch that disappeared, I meant that the code of some branches is not in the DEV Branche, which is the one that "receives" the merges. wanted very much to understand how we did this shit..., but as important as, is to know how to redo these merges, because I have the branches with the codes I need, but when trying to merge with Dev, says that it is already updated.
– Quati_Maldito
Take a look at Bitbucket, see if the branchs are still there, if it is, problem is only local. Ai falls in @Guilhermenascimento’s comment
– Jonathan de Toni
@Jonathandetoni, the branches of Features and bugs added are local and remote. knows what I can do to merge again?
– Quati_Maldito
Still recommend @Guilhermenascimento’s method of reviewing the log backwards, so you can find the right time where the shit was done
– Jonathan de Toni
If they’re not in the branch then you didn’t commit them, if you didn’t commit then they don’t exist and they never existed and you can’t get something you didn’t save (cc @Jonathandetoni)
– Guilherme Nascimento
@Guilhermenascimento, man, thanks for the help, but this is pretty crazy for someone who doesn’t know much like me..., the commits are in the remote. I develop in a local environment, then develop several branches, and commit and merge with DEV each time q finishes the job. Ai generated a new Dev-based Ranche, and followed the game, until last Friday, the other Dev merged with the branch he was developing and then "disappeared" the codes that had been merged (merge).
– Quati_Maldito
Dude, a recommendation, start using tools like git-flow, make it easier to work, are few commands and do everything right. For those not used to it, it’s a great entrance!
– Jonathan de Toni
If they are on the remote then the code is there, does another local branch as the name RECOVER and makes the rollback to the point that you need to take those files, copy everything you need, delete the branch, take what you copied and adjust in your editing branch, ready :)
– Guilherme Nascimento