1

I have a git branch named branch_name.

I used git pull, and after getting Already up to date.. I ran git diff origin/branch_name branch_name in order to see if the branches identical. Well there is one file with some diffs.

I used git diff HEAD branch_name and it yields an empty line. When used git diff HEAD origin/branch_name it founds the same diffs. If I understood Git correctly, it means the fetch is not working as I expected?

I am bit new to Git. Please help me solve this pull problem. I wish to merge the remote repository to my local repo.

SwissCodeMen
  • 4,222
  • 8
  • 24
  • 34
Shaq
  • 303
  • 1
  • 10
  • 2
    This question is confusing. I think what you call "repository" is really a "branch". The only real repository referenced in all the shown commands is "origin". "repo_name" is the name of a branch. "origin/repo_name" refers to branch named "repo_name" in repository named "origin". Please [edit] question and rephrase it, if that's the case. – Sam Varshavchik Aug 23 '20 at 14:27
  • You used `git pull` when? Were you actually on your branch when you said that? What branch are you on now? – matt Aug 23 '20 at 14:34
  • All in the same branch.. I used git pull and right after ran the diff – Shaq Aug 23 '20 at 14:38
  • I doubt it. What you are describing sounds like you are on master. What does `git status` say? – matt Aug 23 '20 at 14:41
  • git status says all good. – Shaq Aug 23 '20 at 14:49

1 Answers1

-1

Ok I figured out the problem, so lets share what made my issues, and hopefully help someone in the future:

When I used git pull originally with Pycharm, I had few conflicts. I solved them but didn't approve manually all the changes in the file. For example in file X.py I had 15 changes and 2 conflicts, I solved the conflicts, and thought Git will insert the rest of the changes (which are not conflicts) by itself. So, well, if there were conflicts in this file apparently it doesn't.

Thanks for all the helps.

Shaq
  • 303
  • 1
  • 10