LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   git: getting on the same code level (github) (https://www.linuxquestions.org/questions/programming-9/git-getting-on-the-same-code-level-github-847658/)

deadeyes 12-01-2010 05:17 AM

git: getting on the same code level (github)
 
Hi all,

I am using git just a few weeks and I am having a problem.

I first created a fork on github from an existing git repo.
Then I made changes to my fork and pushed them to github again.
After that the person from who I forked included my changes in his code but made some alterations on it.
What I want to do know is having the exact code he has in the repo.
This way I am sure that I actually develop on the same code.

I wonder how I should do this.
I tried using git mergetool but I had some conflicts.
So if I resolve the conflicts and make some mistake here, then I still wouldn't have the code the original repo(the repo where I forked from) has.

Can someone tell me what is the correct way to do this?

Thanks in advance!

dugan 12-01-2010 08:26 AM

This looks like a good answer. Especially the "Pulling in upstream changes" section:

http://help.github.com/forking/

deadeyes 12-01-2010 03:49 PM

Quote:

Originally Posted by dugan (Post 4177057)
This looks like a good answer. Especially the "Pulling in upstream changes" section:

http://help.github.com/forking/

I am aware of the git pull/git fetch,merge commands. However if you have a merge conflict then you have to do the changes to the file yourself.
And if something is done wrong here, then you don't have the exact repo contents as the original repo I forked from.

I tried something and pulled from his git repo. Then there were merge conflicts and for those files I copied the content as they are on his repo for these files.
However I don't know if this will keep my repo intact for future use (read as: I commit, push. Other git owner pulls and merges.)


All times are GMT -5. The time now is 07:10 PM.