tags:

views:

21

answers:

1

Hi,

I have followed this instruction in setting my webkit repository locally:

http://trac.webkit.org/wiki/UsingGitWithWebKit

And then I made some changes locally.

My question is how can I sync up my repository to the master Webkit repository? I tried 'git fetch', i don't see files are added/deleted.

And then I tried 'git pull', I do see files are added/deteted. Like this:

WebKitTools/ChangeLog                              |    6 +
 WebKitTools/Scripts/webkitpy/committers.py         |    2 +-
 157 files changed, 1441 insertions(+), 1167 deletions(-)
 create mode 100644 LayoutTests/fast/text/line-break-after-question-mark-expected.txt
 create mode 100644 LayoutTests/fast/text/line-break-after-question-mark.html
 create mode 100644 LayoutTests/fast/text/script-tests/line-break-after-question-mark.js
 delete mode 100644 LayoutTests/storage/domstorage/documentURI.html
 create mode 100644 LayoutTests/storage/domstorage/events/basic-body-attribute-expected.txt
+2  A: 

git fetch only fetches changes from remote repository, but not merge your local master branch with remote. You can always git merge or git rebase to origin/master, or do it with just one command: git pull of git pull --rebase.

git pull is preffered way if you want to get changes from remote, it does fetch and merge.

MBO
Thank you. Can you please tell me what is the difference between 'git pull' and 'git pull --rebase'?
n179911
@n179911 `git pull` fetches changes from remote repository and then merges them to master. `git pull --rebase` makes rebase instead. If you have local changes, then merge will create merge commit with 2 parents, but rebase will get all your local changes and apply then onto o new master (as fetched from repository). See http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html for more info and examples. If you don't have local changes, then both will work same way.
MBO