cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group