LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-01-2010, 05:17 AM   #1
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
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!
 
Old 12-01-2010, 08:26 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,220

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

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

Last edited by dugan; 12-01-2010 at 08:41 AM.
 
Old 12-01-2010, 03:49 PM   #3
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Original Poster
Rep: Reputation: 79
Quote:
Originally Posted by dugan View Post
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.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use git to host my code at Google jamesbon Linux - Software 2 11-28-2010 09:48 PM
SourceForge vs. GitHub MTK358 Programming 1 08-25-2010 10:51 AM
LXer: This week at LWN: Gerrit: Google-style code review meets git LXer Syndicated Linux News 0 11-18-2009 05:50 AM
LXer: Shipping quality code with git LXer Syndicated Linux News 0 05-03-2008 03:00 AM
LXer: Manage Source Code and Linux Kernal Revision Using Git LXer Syndicated Linux News 0 07-01-2006 08:54 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration