cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

New branch has a changes

SparrowDev
New Contributor II

Hi there, I ran into issue with Databricks repo. When I create new repo, it doesn't pull default branch from GitLab. I have default branch 'development', but Databricks repo pulls other branch.

Moreover this just now added repo already contains changes in one file, so it'll raise merge conflict, if I try to checkout on another branch.

It looks like a bug. Does anybody know how I can solve it?

1 ACCEPTED SOLUTION

Accepted Solutions

-werners-
Esteemed Contributor III

I had a similar issue, where a few notebooks popped up as changed in every branch I created (even though they were not touched). So first I manually did the discard changes thing, but that was not a solution as with every new branch they were there again.

So I checked what was 'changed'. And that was in fact nothing so I took those 'changed' notebooks into my PR.

When merging the PR, git detected that nothing was in fact changed, so they were not merged.

On the other hand: in Databricks they would not show up anymore, so the issue seems to be fixed.

The issue popped up after an update so my guess it was indeed a bug.

View solution in original post

5 REPLIES 5

Hubert-Dudek
Esteemed Contributor III

I would just in the repo panel, click three dots, choose "Discard changes," and then checkout to another branch, but please backup your file before that.

image.png

SparrowDev
New Contributor II

Yeah, of course it will work. But, first it doesn't explain why does it happen, and second when I'm triggering my CI/CD pipeline it automatically creates a repo via REST API and then checkouts on feature branch. This logic fails cause just created repo contains changes. Databricks REST Repo API doesn't provide logic for discarding changes into the repo. And I can't discard them each time manually.

-werners-
Esteemed Contributor III

I had a similar issue, where a few notebooks popped up as changed in every branch I created (even though they were not touched). So first I manually did the discard changes thing, but that was not a solution as with every new branch they were there again.

So I checked what was 'changed'. And that was in fact nothing so I took those 'changed' notebooks into my PR.

When merging the PR, git detected that nothing was in fact changed, so they were not merged.

On the other hand: in Databricks they would not show up anymore, so the issue seems to be fixed.

The issue popped up after an update so my guess it was indeed a bug.

Hubert-Dudek
Esteemed Contributor III

Maybe it is because of line ending problem/settings https://stackoverflow.com/questions/10418975/how-to-change-line-ending-settings

Thanks! It works.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.