EGit本地与远程存储库 [英] EGit Local vs. Remote repositories
问题描述
所以我的问题是,我正确地使用egit吗?
我应该继续将更改推送到远程GitHub存储库吗?如果是这样,一旦我共享项目和其他开发人员克隆存储库并开始对远程存储库进行更改,会发生什么?
或者我现在可以通过克隆我最初从我的工作区创建的现有GitHub存储库来ub本地存储库并设置一个新的远程存储库?
或者我是否为我现有的git仓库创建一个新的Push和FetchRemote?
还是别的?
困惑。
对远程跟踪分支有很好的了解。
您可以创建多个本地分支(即分支,你不必要推送任何地方)如你想/需要。
但是,如果你不看任何远程分支,也许你没有获取GitHub回购首先:请参阅获取。
I'm new to git and am wrapping my head around how I'm supposed to be using git and egit. From the egit tutorial, I have setup a respository on GitHub, pushed my Eclipse projects to the remote GitHub repository from my local workspace, I can push changes to GitHub, switch branches, see the updates on GitHub, etc. This all makes sense.
Looking at the Git Repository explorer, I have a listing of "Local" branches and have no "Remote Tracking" branches and I have no "Remotes" listed. When I create a branch from a local branch, the egit dialog indicates "You are creating a branch based on a local branch" and suggests that I should be making a branch from a remote tracking branch.
So my question is, am I correctly using egit?
Should I just continue pushing changes to the remote GitHub repository? If so, what happens once I share the project and other developers clone the repository and start making changes to the remote repository?
Or should I now ditch the local repository and setup a new remote repository by cloning the existing GitHub repository that I initially created from my workspace?
Or do I create a new Push and Fetch "Remote" for my existing git repository?
Or something else?
Confused.
The "Branching" section of the Egit User Guide can help:
There is no obligation to create a local branch which would be named like a remote tracking branch (see "Having a hard time understanding git-fetch
" to have a good understanding of "remote tracing branches).
You can create as many local branches (i.e. branches that you won't necessary push anywhere) as you want/need.
But if you don"t see any remote branch, maybe you didn't fetch that GitHub repo in the first place: see Fetching.
这篇关于EGit本地与远程存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!