Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,455,372
Community Members
 
Community Events
175
Community Groups

Empty repo handling with alternate initial branch names

I believe there is a small issue with the "You have an empty repository" screen displayed by BitBucket Server 7.9.0 which could cause later problems for situations where the repositories are not intended to use the default "master" branch name any more. If an empty repo is created by the Project administrator with a default branch name of "main", I believe the instructions that show on the page for "My code is ready to be pushed" should be slightly different. Specifically, the line "git init" on those instructions should be "git init -b main". Otherwise, git will create the new repo with the default branch name matching that user's locally configured default branch name (which still defaults to "master"). The line "git push -u origin HEAD:main" will workaround this in the short term by setting up so that whatever their local branch name ends up being, it will be linked to the correct branch name on BitBucket. However, it still sets up a situation where they have a local branch that does not match names with its associated BitBucket branch.

1 comment

After working with a developer with an older version of git installed, I realized that the git init -b option is relatively new (added in 2.28, was not present in 2.27). So instead my suggestion is to insert a "git branch -m main" command after the commit, but before the push. From my experiments, this works regardless of what the automatically generated branch name was, and git branch -m is supported as far back as I can find documentation for

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events