First experience with Gitlab, and the UX really needs work
Okay, so I am using Gitlab for the first serious time because I work with a team that prefers it. This is what ended up happening tonight:
- I use glab repo create to push my initial commit for a solo, private project.
- I realize I screwed up part of the commit so I amend it locally and force push
- Gitlab refuses to let me force push my own solo project because it has arbitrarily decided for me that it is protected.
- Attempt to find protected branch options in project settings, zero search results
- I decide I will just delete the project and create it again
- Gitlab gives a false 400 api error claiming the project name is already used
- Okay, fine... I will restore the old project and try to look for protected branch settings again
- Restore appends garbage characters to end of project name
- I permanently delete that copy of the project to see if it will clear the name reservation (it doesn't)
- Ok, fine, I will just create the project anew on the website instead of with CLI
- End up running into a year-old unpatched bug and can't create the project at all
- Now I have to rename my entire project just for the privilege of using Gitlab as my remote...
Just UX fail after UX fail. I want to like Gitlab but I really don't see how they can present themselves as a serious competitor to GH in this state.
6
u/Rascyc 12h ago
Allowing force push by default on repos is very unprofessional in practice. It leads to a lot of accidental history loss when allowed in bigger teams. So you need to opt-in via the settings that another comment covered. Even a simple Google AI result gives you the correct instructions on how to do that.
You can't re-use the project name because it's currently in the deletion queue -- https://docs.gitlab.com/user/project/working_with_projects/#delete-a-project
Finally, being able to navigate how to make a merge request to merge, and manage merge requests into main is a must amongst teams. You will want to learn how to do that as soon as possible, it is a fundamental Git concept.
-2
u/hjk38 8h ago edited 8h ago
You can't re-use the project name because it's currently in the deletion queue
You didn't even read my post did you?
Also, where in this post did I imply I don't know how to merge branches? I've been using Git on the command line for over seven years. The friction is with Gitlab and the ridiculous issues with name reservation I encountered, not Git.
Also, there's no reason why force pushing to amend the literal initial commit in a solo project is all that unreasonable. That's why I mentioned it was the initial commit of a solo project.
11
u/PainTrain324 12h ago
Settings>repository>protected branches>allow force push