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

How to "force" push?

When I click the "Push" button in the SourceTree window I get a window asking me to select the desired branch and at the bottom of this window there is an option to "Force Push" (which is necessary after a rebase). Unfortunately, this option is grayed-out and I am not able to select it. Why is this option not selectable?

I'm using Sourcetree 2.4.7.0 on Windows 10

1 answer

1 accepted

17 votes
Answer accepted
Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 02, 2018

Hello! A force push is a potentially dangerous operation as it rewrites history, therefore the ability to do so is locked behind a setting in the Options menu:

 

forcepush.PNG

Thank you Mike. I found the option you mention and indeed "Force Push" is now selectable. Thanks.

By the way, when did this change? I have been using Sourcetree for a long time and I don't remember ever having to enable "Force push".

Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 02, 2018

This change happened quite a long time ago -- around version 1.9 which was released in Dec of 2016

Like qi ren likes this

That's surprising because I have been rebasing and force pushing in 2017. It's only in the last few weeks (maybe few months, I can't remember exactly when I noticed this issue) that the option became grayed out and prevented me from force pushing.

Anyway... it's working now so I'm happy.

One more comment: in order for me to force push I have to check the "Force Push" checkbox in the "Push" window, and then I get another window telling me that "one or more branch is selected to force push. This may result in a destructive operation" and asking me to confirm that I really want to force push. Is a "Enable Force Push" global setting really necessary? I understand force pushing is potentially dangerous but I must already take two actions to demonstrate that I really want to perform this action. Is a third failsafe really necessary?

If Atlassian feels that this global setting is necessary, I suggest a tooltip that would show up when I hover my mouse over the grayed out "Force Push" and would say something like: "in order to enable this option you must enable the global option and thus demonstrate that you understand the potentially dangerous nature of force pushing".

Like # people like this

Sourcetree for the Mac has Allow force push under the Advanced tab in Preferences.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events