Sunday, September 29, 2013

using github + eclipse to pull code

eGit doesn't know, which remote branch you want to pull from. If you create your local branch based on a remote tracking branch, then the key is generated automatically. Otherwise you have to create it yourself:
branch.master.merge=refs/heads/master
branch.master.remote=origin
where master stands for the branchname, in the key it's your local branch, in the value it's the branch in the remote repository. Place that in the repository-specific configuration file%repositorypath%\.git\config
As for the terms:
  • merge: join two or more development histories together
  • fetch: download objects and refs from another repository
  • pull: fetch from and merge with another repository or local branch
  • sync: allows you to compare 2 branches
In general, I urge you to read eGit user guide, where you can get even better understanding of Git and eGit. It can be found at http://wiki.eclipse.org/EGit/User_Guide

No comments:

Post a Comment