Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with .gitkeep Files and Branch Switching #3160

Open
keeganedwin opened this issue Sep 30, 2024 · 1 comment
Open

Issue with .gitkeep Files and Branch Switching #3160

keeganedwin opened this issue Sep 30, 2024 · 1 comment

Comments

@keeganedwin
Copy link
Collaborator

Describe the bug
User has a problem where when the try to push on gitlab the screenshot provided below shows up and they cannot see what is the problem but can just close it.

When switching branches, the presence of .gitkeep files, which are used to preserve empty directories in Git, seems to be related to a post 2.0 bug fix for GitLab. This mechanism may not be necessary and could be removed after thorough testing to ensure the bug is not reintroduced.

To Reproduce
Steps to reproduce the behavior:

  1. Create a repository with empty directories containing .gitkeep files.
  2. Switch between branches and observe the behavior of these directories.
  3. Note any inconsistencies or issues that arise.

Expected behavior
Empty directories should be preserved without the need for .gitkeep files, especially if other files are added later.

Screenshots or Screencasts
Screenshot 2024-09-18 at 14 35 00

@teyepe
Copy link

teyepe commented Oct 8, 2024

I can confirm that I’m running the same issue when pushing a branch to GitLab via plugin’s UI. No matter what the changes are, .gitkeep is consistently added to my commits.

In my case the problem occurs when I run some pipeline jobs, where it breaks the build. As of now, the only workaround is to manually delete the .gitkeep each time before merging my branch and finally run the pipeline.

Ideally, I’d like to get rid of that file entirely. Thanks ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📥 Triage
Development

No branches or pull requests

2 participants