Changes between Version 32 and Version 33 of UsingGitWithWebKit
- Timestamp:
- Aug 18, 2009, 7:07:25 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsingGitWithWebKit
v32 v33 20 20 port install git-core 21 21 }}} 22 or if you're using [http://www.macports.org/ MacPorts] and you want to track the svn repository (e.g., a committer):22 or if you're using [http://www.macports.org/ MacPorts] and you want to track the Subversion repository (e.g., a committer): 23 23 {{{ 24 24 port install git-core +svn … … 36 36 }}} 37 37 38 If you'd also like to track the svn repository (the {{{git update-ref}}} command is the secret to reusing the cloned git repository to fast-forward to the tip of the svn repository):38 If you'd also like to track the Subversion repository (the {{{git update-ref}}} command is the secret to reusing the cloned git repository to fast-forward to the tip of the Subversion repository): 39 39 40 40 {{{ … … 44 44 }}} 45 45 46 This will add the following section to your `.git/config`: 47 48 {{{ 49 [svn-remote "svn"] 50 url = http://svn.webkit.org/repository/webkit 51 fetch = trunk:refs/remotes/trunk 52 }}} 53 54 You can then run the following command to have `git-svn` rebuild its metadata from your local repository, and to pull any recent commits from the WebKit SVN repository. 55 56 {{{ 57 git svn fetch 58 }}} 59 46 60 == Updating == 47 61 48 If you are tracking the svn repository, this command will fetch information about new commits from svn, reset your local branch to match svn exactly, and then apply your local commits on top: 62 If you're not tracking the Subversion repository the following command will fetch new commits from `git.webkit.org`: 63 64 {{{ 65 git fetch 66 }}} 67 68 You can then merge or rebase your local branches with `origin/master` to pick up the new commits. 69 70 If you are tracking the Subversion repository, this command will fetch information about new commits from Subversion, reset your local branch to match Subversion exactly, and then apply your local commits on top: 49 71 50 72 {{{ … … 52 74 }}} 53 75 54 If you are tracking the svn repository, this command will fetch information about new commits from svn:76 If you'd like to fetch new commits from the Subversion repository without moving your local branch, you can use the following command: 55 77 56 78 {{{ … … 58 80 }}} 59 81 60 == Commit through git 82 == Commit through git-svn == 61 83 62 If you have been granted commit access to WebKit's svn repository it is possible to work entirely with git and still commit through git svn.84 If you have been granted commit access to WebKit's SVN repository it is possible to work entirely with git and to commit through `git-svn`. 63 85 64 First, you'll need to make sure you have the appropriate remote in your git config: 65 66 {{{ 67 [svn-remote "svn"] 68 url = http://svn.webkit.org/repository/webkit/trunk 69 fetch = :refs/remotes/git-svn 70 }}} 71 72 Now, you need to update your repo to the latest from the svn repository. You can either: 73 74 * Run 'git svn rebase' which will be incredibly slow... 75 * Use the {{{git update-ref}}} trick manually as mentioned above... 76 * Use the handy {{{update-gitsvn-from-origin}}} script found in the QtWebKit tools repository here: http://gitorious.org/qtwebkit/tools 77 78 After you have a working remote and have fetched all the blobs of info from it you can: 79 1. Create a 'tot_staging' branch or whatever name you choose 86 After you have configured your working copy to track the Subversion repository you can: 87 1. Create a `tot_staging` branch or whatever name you choose 80 88 2. Apply a patch, cherry-pick a commit, or even merge a branch if it has been reviewed 81 3. Run {{{git svn rebase}}}and fix any ChangeLog conflicts that might result82 4. And then when everything is ready: {{{git svn dcommit}}}89 3. Run `git svn rebase` and fix any ChangeLog conflicts that might result 90 4. And then when everything is ready: `git svn dcommit`. 83 91 84 92 == WebKit Script support for Git == 85 93 86 The various scripts in WebKitTools/Scriptshave been made to work pretty well with Git. Here are some94 The various scripts in `WebKitTools/Scripts` have been made to work pretty well with Git. Here are some 87 95 of the specific things you can do with them: 88 96 … … 152 160 153 161 == Ignores == 154 * You can setup your git repository to ignore the same files that are ignored in the tracked svn repository with: (this will take some time)162 * You can setup your git repository to ignore the same files that are ignored in the tracked Subversion repository with: (this will take some time) 155 163 {{{ 156 164 git svn show-ignore >> .git/info/exclude