tags:

views:

110

answers:

1

I've never used a code source control system and I'm starting with GitHub and it looks amazing!

I read the guides and I think I can understand pretty well how it works, and I'm working with it already, but something is not clear to me: does GitHub automatically sync the changes in the original repo to my fork?

I've forked a project and according with the guide, since this point I have my own copy of the project and changes in the original repo shouldn't be made in my repo (that's what I've understood), but the project owner updated the original repo, I saw the change and liked it, but I didn't want to use it in my repo at the moment, I looked at my repo and the changes where not there, some hours later then I got back in my repo and the changes where there!

I didn't execute any command, nothing! I'm not complaining, I think it's really great, but I must be sure of how it works to think about how I'll develop.

My questions:

  1. GitHub automatically update my repo with the changes in the original repo?
  2. How often, once a day? If I push a change to my repo and then that file is updated in the original repo before I make a pull request, my changes will be deleted and my file overwriten or it will be merged?
  3. And what if there're conflicting changes of mine and the original repo?

Thankz in advance!

+1  A: 

I think you might want to look at what the forking guide says beneath "Pulling in upstream changes". The upstream branch isn't some magic branch though, you'll need to have your repo set up like their's in that tutorial. If there's a conflict, I think you'll just need to merge it like any other merge conflict in git.

dylanfm
Hello there! I did read that guide, but my question is about that. My fork in the GitHub repo was updated with the changes of the original repo before I did anything. I didn't tip any git command. Of course my local repo wasn't updated and it still have the code of when I cloned it, but the question is about my fork in the GitHub site.Thankz for your reply man!
Alaor