Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8232615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:53:31+00:00 2026-06-07T17:53:31+00:00

I often rebase feature branches and then want to force push them to the

  • 0

I often rebase feature branches and then want to force push them to the server.

git push --force origin feature-mongodb-support

Is there any shortcut for git push --force origin <current branch>?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:53:34+00:00Added an answer on June 7, 2026 at 5:53 pm

    You can use aliases to shorten the command. Use it like this:

    git config --global alias.fpush "push --force origin"
    

    Now to push your branch just type:

    git fpush feature-mongodb-support
    

    Or you can even hardcode the branch name into the command:

    git alias fpush "push --force origin feature-mongodb-support"
    

    and use only git fpush to push your precious work into the upstream.

    However, non-fast-forward updates are dangerous since you will basically overwrite all the history on server that occurred between the last merge/rebase into your local branch and the forced push. If you need to do them often there is definitely something wrong in your workflow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When doing a git rebase , I often have difficulty working out what is
Often while I'm dealing with LINQ sequences, I want to send each item to
It is often said that, you should not rebase commits that you have already
We set policy to force rebase before delivery if any baseline is recommended. But
Using git v1.7.1 I'm trying to do a rebase with both the --preserve-merges and
Often, when I am developing in PHP, I want to see minor changes instantaneously.
Often I find myself with some text where I want to exclude a certain
I often have at least 3 remote branches: master, staging and production. I have
Often, I need to do an expensive task then display results. So I ramp
Often I need to temporary comment some code, but there are situations like the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.