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,552,112
Community Members
 
Community Events
184
Community Groups

How can I modify file and push to my branch by RestApi v2

I'm trying to modify some files and push them to the `test` branch. I didn't find something in the documentation. can you please anyone tell me how can I do that? and can I push multiple files? (not I'm talking about Bitbucket rest APIv2, not Bitbucket server)

1 answer

1 accepted

0 votes
Answer accepted
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 08, 2023

As you write about REST API, I guess you're trying to programatically push commits to a remote Bitbucket Cloud repo.

If so, then do NOT use the REST API for that!

Programatically clone the repo, then work on the local clone and push changes. You can use the git commandline client for that (or other client libraries that are available for all major programming languages). You would basically work with the Git tool in your program just like a human user.

Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 08, 2023

Oh, I didn't know about this approach. Interesting, thanks.

(I am not sure though if I used the REST API to do this if I had the option of using the Git client.)

@Aron Gombas _Midori_ yes but if you have big projects and you need something to work on all of these projects like webhook. git clone will be very expinsive 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events