分类: 项目管理
2012-03-29 16:22:42
suppose that alice has started a new project with a git repository in /local/alice/project and that Bob who has a home directory on the same machine want to contribute.
Bob begin with
点击(此处)折叠或打开
Bod then edit the files and git commit them;
when he is ready, he tells alice to pull changes from the repository at /local/bob/myproject she does this with点击(此处)折叠或打开
the pull command thus performs two operations: it fetches changes from a remote branch, then merges them into the current branch。when you are working in a small closely knit group, it is not unusual to interact with the same repository over and over again, by defining 'remote ' repository shorthand, you can make it easy.
点击(此处)折叠或打开
unlike long hand form, when alice fetches from bob using a remote repository shorthand set up with git remote what was fetched is stored in a remote tracking branch, in this case bob/master . So after this
点击(此处)折叠或打开
shows list of all the changes that bob made since he branched from alice's master branch.
After examing those changes, alice could merge the changes into her master branch点击(此处)折叠或打开
then bob could used the git pull to sync the alice any changes