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

  • Home
  • SEARCH
  • 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 7682893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:40:20+00:00 2026-05-31T18:40:20+00:00

Generally whenever i want to push in the changes to remote Git i follow

  • 0

Generally whenever i want to push in the changes to remote Git i follow thee steps:

git stash
git pull
git stash pop
//Resolve conflicts if any
git push

However i have also seen my teammates doing the following:

git pull --rebase
//Resolve conflicts if any
git push

I just want to know is there anything beneficial over one another. Or even if there is any other approach that is good.

  • 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-05-31T18:40:21+00:00Added an answer on May 31, 2026 at 6:40 pm

    It depends on your needs: rebase produces a linear history while pull could lead to merge commits. I’s described in detail on that answer: https://stackoverflow.com/a/804178/520162

    And your approach is only equivalent to git pull --rebase as long as you didn’t commit anything since your last pull.


    Side Note:

    If you’re using Git really that way, you’re using it wrong. It’s not like SVN where you have to ensure that your repo is in sync with an upstream repo before you could commit.

    The usual Git workflow is:

    • fetch upstream
    • tell your story (i.e. do a bug fix, an improvement, whatever; do some commits)
    • once you’re done it’s time to fetch upstream again
    • merge or rebase your changes into upstream
    • push to upstream

    Maybe you should browse a bit through Git for beginners: The definitive practical guide

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

Sidebar

Related Questions

Whenever we make changes to the CSS, it generally takes 24 hours to reflect
Generally,our fixes/patches for any bugs involves changes in multiple files and we will commit
I want to develop a webpage that moves towards the left direction whenever the
I want to create a Visual Studio Extension. That extension, whenever ran by the
I would like to change the dropdown list and whenever I make some changes
Whenever i want to add a javascript library programatically, say jquery for example, it
Whenever, I want to plot multiple 2d line graphs graphs with matplotlib, I define
Whenever I execute a linux command that outputs multiple lines, I want to perform
Generally when I use ClickOnce when I build a VB.NET program but it has
Generally the database server is the biggest, most expensive box we have to buy

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.