0

We are using bit bucket as a repository. Below is a scenario we got.

  1. Pull from Branch A (commit already in Develop Branch of A) -> B (git pull origin A)

  2. Reverted commit in branch B of A (git revert)

  3. Now i want same commit in branch B, hence creating pull from Develop -> B But so no changes available to pull.

How do i resolve this situation?

I have tried merge, git pull but still no chances.

torek
  • 448,244
  • 59
  • 642
  • 775
Harshal C
  • 7
  • 5

1 Answers1

0

Remember to run the git fetch --all command to retrieve all changes if there are any, then try again.

NewbieCody
  • 39
  • 6
  • `--all` means *all remotes*. The OP has only one remote (`origin`), so `--all` has no effect. – torek Nov 05 '22 at 12:25
  • I believe that `--all` should still work because it means to fetch all branches from all remotes. – NewbieCody Nov 05 '22 at 15:09
  • 1
    `--all` *just* means "all remotes"; it has no effect on the set of branches, which are determined by the refspecs. The OP's actual issue is that he's added a revert commit, and is expecting a second merge of the old already-reverted commit to do something it won't do. – torek Nov 05 '22 at 15:13
  • 1
    This is just wrong. `fetch --all` doesn't mean what you (@NewbieCody) think it does, and it won't change anything about the OP's situation. – matt Nov 05 '22 at 16:16
  • Hi Torek & Matt, thanks for suggestion. I think i can do cherry pick commit from Develop. – Harshal C Nov 06 '22 at 12:54