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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:26:25+00:00 2026-06-18T10:26:25+00:00

I have just now started using Git and previously used CVS for versioning. Can

  • 0

I have just now started using Git and previously used CVS for versioning.

Can someone explain me how to deal with merge conflict cases in Git? Also what is the standard procedure to follow in such cases.

I faced a situation after doing the below steps,

  1. I had committed some files into my local repository using git add and git commit
  2. Later when I tried to push my local repo changes to a remote repo, it fails with a non-fast-forward error and prompts me to pull before pushing.
  3. So I tried git pull to fetch the latest from remote repo into my local repo. Pull failed and said there were merge conflicts.

Let’s assume I pull from the remote into my local repo and then do step 1 (committing files). What happens if someone else pushed their changes before I push to the remote repo. I believe push ending with merge is a usual case. How to deal with these cases?

I assume pull involves fetch + merge. In my case automatic merge seems to have failed. What do I have to do in the above case? Please also tell me how to avoid getting into such situations?

  • 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-18T10:26:26+00:00Added an answer on June 18, 2026 at 10:26 am

    Here’s a quick list of how I do my git commits:

    1. git clone <repository url>
    2. make changes
    3. git stash: this stashes your uncommitted changes away in a temporary cache (and temporarily removes them from the working directory, so you have a clean copy)
    4. git pull to get latest repository version
    5. git stash pop applies stashed changes to local repository (and remove them from the stash); this might produce conflicts, just like a merge or rebase
    6. fix any conflicts
    7. git add <changed files>
    8. git commit, using -m to provide a short message or leaving it out to open an editor
    9. git push to publish your changes to the remote

    They way to avoid the problem you hit is to stash your changes before a pull, then pop the stash after pull is complete.

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

Sidebar

Related Questions

I have just started with my project using MVC and Razor. Now I am
I've just started using Git and I love it, but I have had an
I have just started using an exception logger (EurekaLog) in my (Delphi) application. Now
Just now I have started using netbeans 6.9.1. I want to create a HTML5
I have just started using Git on Windows. I am hosting on BitBucket and
I have been using TortoiseSVN for a while now and just recently started using
I am new to NHibernate and have just started right now. I have very
I have just created a GIT on a folder. I now want to add
We have just started using VisualSVN, TortoiseSVN and ankhSVN plug-in to handle our source
I have just started using OutputCache on some of my controller actions and I

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.