2

I would like to pull updates that a friends just pushed a week ago on github with intellij Idea. I open the project on my computer, checkout on the correct branch , went to VCS ->git -> pull , choose the correct branch , but nothing appended.

Thus, I decided to go on github, to verify if those changes where applied on the repository, and yes, the repository is up to date in github but i'm not able to pull changes.

I also tried to clone the project and recreate a new project on Intellij Idea but it make no changes...

Could somebody explain me how can i fix my problem, and get all changes made to the project ?

  • If your local copy of the repository is up to date, pulling won't have any effect. What does `git fetch -v` say? – Makoto Nov 25 '17 at 16:12
  • i Used terminal from Intellij Idea It return me : from " another project that the one i'm working on" = [ Up to date] the branch à would like to use -> origin/"the same branch" = [Up to date] anotherBranch -> origin/master does it mean that i'm trying to pull something from a random repository ? –  Nov 25 '17 at 16:21

1 Answers1

0

does it mean that I am trying to pull something from a random repository ?

In order to avoid that, the easiest workaround is to:

  • git clone the GitHub repo in another folder
  • open that folder with IntelliJ IDEA: it will recognize the project (and the remote Git repo)

The OP JerDum adds in the comments:

Some additionnal informations where stocked in the .gitconfig, and these informations interfered with Intellij Idea, and with Git, in the terminal.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • i tried to do it but i clone the wrong repository. In fact, it's cloning the repository of one of my school work in place of what i want. I went to gitlab to see if anything had changes and i add a branch in my school project. I download the Zip file to save my work, but it doesn't change my git problem :/ –  Nov 26 '17 at 12:05
  • @JerDum Once cloned, do you see the right URL when typing `git remote -v` in it? Maybe it is just a matter of getting the right branch: do you see it when doing a `git branch -avv`? – VonC Nov 26 '17 at 12:06
  • Hi, When i clone in the terminal, i notice that it ask me to identify myself with my gitlab account( and the project that i want to clone is on github). then, when i write "git remote -v", it return me something like that: "Fatal: this and none of this parents repository are a git deposit" –  Nov 26 '17 at 17:35
  • @JerDum Then check your git credential manger, as in https://stackoverflow.com/a/47466980/6309 – VonC Nov 26 '17 at 19:49
  • I found The solution to my problem. Somes additionnals informations where stocked in the .gitconfig , and these informations interfered with Intellij Idea, and with git , in the terminal . Thanks you for all your help ! –  Nov 28 '17 at 11:39
  • @JerDum Great! I have edited the answer accordingly. What were those informations? – VonC Nov 28 '17 at 11:48
  • It was about remote and [include] information that refers to the .git file, if my memories are wright :) –  Nov 28 '17 at 14:14