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
Community Members
Community Events
Community Groups

error uploading a new file to bitbucket server repo


Hi, im using the Rest bitbucket api to commit a new file to a branch

I can update an exsising file, but when I try to upload a new file (should be supported by same put method)- I get an error that the fileName was deleted. It doesn't recognize the file- but sure it wont. the file isn't exist yet. I want to create it with a commit.



I use sourceCommitId null as written for uploading a new file


curl -X PUT -u MyServerUserName:MyServerPass -F content='Test adding a file' -F message='Test adding a file' -F branch='TestBranch' -F sourceCommitId=null myServerUri


also tried sourceCommitId=""

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

3,494 views 3 10
Read article

Atlassian Community Events