Home > Net >  new branches have appeared in repo
new branches have appeared in repo

Time:04-21

We have a repo called central and another repo called claims

central repo has following branches

  1. dev
  2. uat
  3. prod

It has a few more remote branches but for sake of brevity mention three.

claims repo only has master branch.

A week ago we now see the following branches on the claims repo

  1. master
  2. prod

Both repos are default name is origin. We are a small team and no one knows any commands beyond fetch, commit, pull and push. All these are done by Intellij UI. So I doubt someone wrote a command to add prod branch to claim repo.

My question is, how do I go about invesigating how the prod branch from a different repo got added i.e suddenly appeared in claims repo? Has fetch pulled in all remote branches from all repos? The problem with this theory is that, in that case, we don't see all other remote branches of central (dev and uat branch) in the claims repo.

I tried tracing the UI tree that Intellij provides but cant understand it well. Will be grateful for any insights you have.

intellij log tab shows this tree

CodePudding user response:

Ideally you should see only the master branch. 2 different repos are entirely siloed. You fetch from one repo, it would not sync from another repo.

Feel free to delete the prod branch, if none of your team members have created it. Who is your git provider like bitbucket, github, Azure DevOps? You may check in their branches page to see who was the branch creator. That will clarify how this branch was created

CodePudding user response:

I don't have knowledge of Intellij, but is it possible for you to get to the command line and check some few things ? For e.g. from the claims repo:
git remote -v
git branch -a
git log --all --oneline --graph
Fetch does not update your repo but only get metadata; pull will do the actual refresh and if the HEAD on the other end (I guess centralrepo) was on prod, then only prod will appear in your working tree.

  • Related