I just went in the same issue. Copy and pasted the file name and the content to commit.
Finally realized that this error is due to the fact that when using the paste for the file name, Bitbucket cannot read this. Thus you need to cursor click once inside the title field for it to be registered. Or retype the file name manually. So it worked finally.!
I am having similar issues. I could add a file, but when I tried edit any files online, I got error messages: "We had trouble committing your changes", and when trying to 'View Diff' getting the "We had trouble generating your preview"
This definitely isn't resolved... I am still getting the same error and I use BitBucket because it provides free private repositories... Adding files has been difficult and I get "We had trouble committing your changes." without any other detail. Trying through thumb-rules might work. But, I suppose that such guess works are largely unneeded when error messages can be bit more detailed
I had the same issue after pasting the "filename" into the provided field.
I noticed that had not be updated in the editor display and still read:
Creating on branch: master
After manually entering the filename, the online editor then read:
Creating FILENAME on branch: master
and then the commit proceeded without error.
@Duane Mattern Thanks for this. It appears like the issue has been fixed.
For those who are facing the same problem, here is the solution:
For example, if I have to create a separate folder in the repo there is no way to do so.
So, I tried git add * or even git add .
But, they are not uploading some images of my project.
So, I ended up creating new folder and file simultaneously like this:
Note: GitLFS may/may not work and there may be some Locking API issues due to concurrency. There are solutions for GitHub. I am not sure about BitBucket for GitLFS. For smaller text files, this solution works.