Changes between Version 17 and Version 18 of GitForDarcsUsers
- Timestamp:
- 08/14/08 05:03:25 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GitForDarcsUsers
v17 v18 14 14 }}} 15 15 16 = Git Overview = 16 17 For an overview of what repositories (or parts of repositories) are modified by various git commands: 17 18 http://osteele.com/images/2008/git-transport.png … … 100 101 == darcs pull == 101 102 102 There is a direct mapping for {{{darcs pull -a}}}, but not for the interactive {{{darcs pull}}}. Cherry-picking is not as streamlined as in Darcs. For a start, here is how you update from the source repo: 103 There is no direct mapping for the interactive {{{darcs pull}}}. Cherry-picking is not as streamlined as in Darcs. 104 105 === darcs pull -a === 106 Here is how you update (everything) from the source repo: 103 107 {{{ 104 108 git pull … … 110 114 where {{{origin}}} is the name of your default remote branch. (You can name it as you like, but certain Git commands will use {{{origin}}} as the default if no argument is specified.) 111 115 112 XXX: will this pull into the current branch, or always into master? 116 XXX: will this pull into the current branch, or always into master? (Websites suggest always into master, so you likely need to follow {{{git pull}}} with {{{git rebase <branch-name>}}}) 113 117 114 118 Like in Darcs, you may get conflicts. To resolve conflicts, edit the conflicting file, {{{git add}}} it, and {{{git commit}}} it. … … 118 122 == darcs push == 119 123 120 Selectively pushing patches is not available directly in Git. A comparable workflow is to merge a local branch into the master branch and then {{{git push}}}, which does the same as {{{darcs push -a}}}. 124 Selectively pushing patches is not available directly in Git. {{{git push}}} does the same as {{{darcs push -a}}}. 125 126 A comparable interactive workflow is to merge a selection of patches from a local branch into the local master branch and then {{{git push}}} that. 121 127 122 128 In general, even though a central repository is possible, Git promotes a pull model. That is, to work on a project you typically "fork" ({{{git clone}}}) the source repository, add your changes, publish ''your'' repository, and send a pull-request to the upstream maintainer. The reasoning behind that is that you don't have something akin to a list of committers, but rather the maintainer has a set of trusted peers. This model is very different than what seems to be common among darcs users, but it has its advantages. … … 231 237 232 238 == darcs amend-record == 239 240 It is not easy to amend any patch except the last one committed. 233 241 234 242 If the change to be amended is the latest commit … … 307 315 git branch -d fix_foo # delete the branch we no longer need 308 316 }}} 317 Yes, it is a bit more complicated than using darcs to do the same thing: 318 {{{ 319 darcs pull <upstream> # get latest changes 320 # ... hack ... 321 darcs record # select the proper changes 322 # ... test ... oops, forgot something 323 darcs amend-record # add the new patches 324 # ... test ... looks fine now 325 darcs pull # make sure it's up to date 326 # ... if we get a conflict here, edit the file then 327 # ... darcs amend-record 328 darcs push # push changes <upstream> 329 }}}
