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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:54:35+00:00 2026-06-06T05:54:35+00:00

What I’m trying to do: I work with two friends on a university project,

  • 0
  1. What I’m trying to do:

I work with two friends on a university project, they made some changes to the code.
I’ve also made a lot of changes to the code, most of which I want to keep.

I’m new to git and don’t know where to start.
My friend suggested I use:

git pull origin

When I do that I get:

error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge

I read somewhere on stackoverflow: How do you git fetch then merge? "Error: Your local changes to the following files would be overwritten by merge"

That if I don’t commit changes to local repository, they’ll be lost?

  1. How do you commit locally?
  2. How do I merge changes(Is there a way I could use beyond compare please)?
  3. How do I upload the changes?

Thanks

This is what it looks like now:

Arthur Wulf@SUPERWOLF-PC /c/Current Project/study-wise (master|MERGING)
$ git pull origin master
M       .pydevproject
U       src/app.yaml
M       src/getters/__init__.pyc
M       src/index.yaml
M       src/model/ClassM.pyc
M       src/model/CourseM.py
M       src/model/CourseM.pyc
M       src/model/GeneralM.pyc
M       src/model/LectureM.py
M       src/model/LectureM.pyc
M       src/model/PostClassM.py
A       src/model/PostClassM.pyc
M       src/model/QuestionM.py
M       src/model/QuestionM.pyc
M       src/model/StudentM.py
M       src/model/StudentM.pyc
M       src/model/TopicM.py
M       src/model/TopicM.pyc
M       src/model/__init__.pyc
M       src/setters/__init__.pyc
A       src/setters/setQuestionStats.py
D       src/setters/setRemoveOldData.py
A       src/setters/setStartNewClass.py
A       src/setters/setStudentAnswer.py
D       src/setters/setTopicChanged.py
A       src/setters/setUpdateTopicStats.py
M       src/view/allCourses.html
M       src/view/lecture.html
U       src/view/prof.html
M       src/view/question.html
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.

What I do not understand is how do I beyond compare the files on my local side with the ones on the online origin repository side and merge them?

  • 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-06T05:54:37+00:00Added an answer on June 6, 2026 at 5:54 am

    The right thing to do is to commit all your changes locally, and then try pulling again. That error is there to protect you from losing local changes that haven’t been committed. Creating a commit (committing) is like creating a new snapshot of your code, after which that state is safely recorded.

    To answer your questions:

    1) How do you commit locally?

    Look at the output of git status. If there are any files listed as “Untracked files” that you want to keep in git, use git add <filename>... to indicate that you want them in the next commit. Then look at the files listed as “Changes not staged for commit” – these are files that were already in the repository that you’ve changed. You can again do git add <filename>... for each of those to indicate that you want exactly that version of that file in the commit that you’re preparing. (If you make a further modification to a file, you would have to git add that file again to stage the new contents of the file for the commit.)

    Finally, you should run git commit. That will open up an editor where you should enter a helpful commit message – when you save that file and exit the editor, your commit should be created. Then you can run git pull origin master, as you originally wanted to.

    (As a shortcut, if you do git commit -a, all the changes to files that were already in the repository will be staged for the commit without you having to git add them.)

    2) How do I merge changes(Is there a way I could use beyond compare please)?

    The git pull origin master command that you tried actually does two things:

    1. Fetches the branch master from the remote repository called origin
    2. Merges the state of that fetched branch into your current branch.

    git is good at avoiding complaining about spurious conflicts, but if you do need help dealing with them, look into git mergetool.

    3) How do I upload the changes?

    You can do that with git push origin master.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.