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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


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

Want to refresh/copy Sandbox branch from Production branch

Hi Guys,

I'm sure it's a simple thing but just can't seem to work out how to refresh/copy with overwrite to a remote server using GIT, SourceTree and Pipelines.

I have a Production branch and also a Sandbox branch in SourceTree both using Pipelines to deploy to remote servers on AWS. I would like to ‘refresh’ the Sandbox branch from the Production branch and therefore make a complete copy of the Production server on the Sandbox (or at least copy all the code but without the history).

I have tried a few times using SourceTree with merging and rebasing options but am always ending up with a merged result rather than a fresh copy of the Production branch.

I would like to know if the ‘refresh/copy’ of the Production branch would be possible from within SourceTree or do I need to create a new GIT repo in BitBucket and migrate the Production branch into there and rename it Sandbox?

Also, I’m not sure if there are any options/config available in BitBucket to achieve the refresh/complete copy of the branch.

So far I have used the following approach:

  1. Copy the Production branch to my local dev system
  2. Merge the new branch into the local Sandbox branch and push to remote

This result is a merged branch and not a copy of Production. I also tried deleting the local copy of Sandbox but that did not let me push to remote as it is now misaligned with the ‘HEAD’.

I also tried rebasing but that gave the same error as above when I tried to push the changes to the remote Sandbox.

For the push, I have changed the deployment command in the pipelines.yml to ‘git init’ and have tried removing the git log file as well as all the directories to ensure the full content of the local branch is deployed but this still gave a merged Sandbox/Production result.

Kind Regards



0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events