Git and Eclipse, Merging, Pushing and Committing

I'm new to git and bitbucket so I'm just having some trouble understanding everything, if anyone could give me a short explanation of what each of these does I would be very grateful.

Pull - Im assuming this gets new changes from the repository? What is the difference between "Pull" and "Fetch from upstream"?

Push Branch - This pushes your entire branch onto the repository? Whats the difference between Pushing and a Commit?

Rebase, Reset and Merge - These all sound like they do similar things, but what are the specific differences?

Thanks a lot


Pull does a fetch and merges them by default. Fetch as a standalone operation, would just update from the upstream however, this will not have any affect on the local code unless you do a merge.

When you commit saves your changes locally, and to reflect it on upstream, one should be pushing these changes to it.

Reset is basically resets your changes in the local repository, two famous flags are --hard and --soft, doing a hard reset would completely reset your local changes, however a soft one, would keep the local changes.

For rebasing and merge, I would suggest to read this post, http://stackoverflow.com/questions/16666089/whats-the-difference-between-git-merge-and-git-rebase

链接地址: http://www.djcxy.com/p/45106.html

上一篇: 'git merge'如何搞乱你的提交历史?

下一篇: Git和Eclipse,合并,推进和提交