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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:03:40+00:00 2026-06-18T22:03:40+00:00

I made a copy of a repo from github. Was just playing around the

  • 0

I made a copy of a repo from github. Was just playing around the code a bit, made a branch committed that changes locally and now the original code is updated,so I want to delete whatever I did to my fork and get changes made by the upstream.

I get a conflict if I do

git fetch upstream
git merge upstream/master
#Automatic merge failed; fix conflicts and then commit the result.

and gives in two file names showing few changes which I never did.

So I did a git status which gives me a new filename(which I never made but was made by my upstream) and Unmerged paths:

#   (use "git add/rm <file>..." as appropriate to mark resolution)

for two files.

I want all the new changes and destroy mine. What could possibly be the solution and why does GIT wants me to add a file I never made?

  • 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-18T22:03:41+00:00Added an answer on June 18, 2026 at 10:03 pm

    Abort the conflicted merge:

    git merge --abort
    

    then set your local repo to the same commit as upstream, discarding local changes:

    git reset --hard upstream/master
    

    As for your question:

    why does GIT wants me to add a file I never made?

    It doesn’t. It’s telling you to resolve the conflicts in the files you changed, then git add <file> on those files, to mark the edited versions as resolved and OK to commit.

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

Sidebar

Related Questions

I'm using TortoiseSVN. I just made quite a few changes to my working copy
Consider a verbatim copy of Bloch's Builder pattern (with changes made for C#'s syntax):
I made an iphone app to capture image from camera and to set that
I pull'ed some public repository, made few changes here and there. I committed them
I am just playing around with Go and do not yet have a good
I've just upgraded to Eclipse 3.6. I saved Eclipse 3.5 and made a copy
I made an application that passes trough an XML file and extracts the entries
I made a little PHP script that checks if an email is valid. The
I forked someone elses repository on Bitbucket and made some changes (and pushed them
I have made a copy ( clone) of a php project and renamed it

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.