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 8471147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:42:59+00:00 2026-06-10T16:42:59+00:00

I found this scenario quite common but looking around nothing helped. I’m not really

  • 0

I found this scenario quite “common” but looking around nothing helped.
I’m not really a Git expert but this should be simple.

Let’s make an example:

UserA and UserB are working on the same version (A). UserA committed and pushed to the remote, so now it’s in version B.

I commit only SOME of the files that I wish to push.

When I try to pull (because it’s impossible to push due to the different version) Git will tell me that the “changes not committed will be overwritten by merge”.

UserA: A------B
        \      \<-not possible  
UserB:   \------C

I wish to pull the new version keeping all my changes, also the not committed ones. Is it possible?

I’m using IntelliJ and his built-in plugin (I find it quite friendly), so if someone can explain me also how to do this from there will be great!

  • 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-10T16:43:01+00:00Added an answer on June 10, 2026 at 4:43 pm

    It is possible.

    I think the best practice is to commit your desired changes as you already did (let’s say you work on branch “dev”). Then you create a new branch with the changes uncommitted, let’s say you call it “mywork” : git checkout -b mywork. You commit your other changes on this branch.

    Then comes the merge. First check you’re working on the right branch git checkout dev. At that point I’m not too sure it’ll work properly so an idea would be to run git checkout -b tempdev commitIdWithChangedToBePushed (i.e. you branch from former commit).

    Then you will merge it all. Run git pull origin (origin is your remote) as you would have done. Now it’s all properly merged locally, on tempdev. Merge tempdev into dev and delete tempdev. Now, push to origin.

    As a result, you have now 2 branches : dev with your clean changes, and mywork with your other changes. You can merge them if your idea was to integrate your other changes later.

    By the way, I don’t know IntelliJ plugin so just try to reproduce it in there.

    It is also possible to use stash but I am not a fan of it, just git stash and after you merge, git stash pop (or I think that’s the process). I don’t like it because merging is not always a trivial process and having your changes back will let your run in troubles. Plus you may forget you stashed changes, and stash over them or forget to unstash. Maybe that’s just me though.

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

Sidebar

Related Questions

Found this Multimap containing pairs? , but it is not much help How would
I'm quite new to Git: I come from SVN and there I found really
I apologize if this has been asked before, but I haven't quite found the
I've run into this scenario quite a few times and still haven't found the
I figured this was a common scenario and was surprised not to find an
Found This: tyty stack, Social Icons not working with Infinite Scrolling on Wordpress I'm
found this little code snippet that seems to do what i want, but im
Found this: Sub SurroundWithAppendTag() DTE.ActiveDocument.Selection.Text = .Append( + DTE.ActiveDocument.Selection.Text + ) End Sub But
I have what I imagine is a quite common scenario, yet I didn't find
This seems like the most common relationship but for some reason I cannot get

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.