Changes between Version 77 and Version 78 of HowToGit
- Timestamp:
- 11/03/19 08:00:38 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowToGit
v77 v78 142 142 === Applying a diff file locally === 143 143 144 Patching local repo with `git`: 144 Downloading a pull request as a diff file (example): 145 146 {{{ 147 cd path/to/grass_git/ 148 149 # use the PR number and simply add .diff to the URL 150 wget https://github.com/OSGeo/grass/pull/174.diff 151 }}} 152 153 Patching local repo with `git` (continuing with example diff): 145 154 146 155 {{{ 147 156 # first the stats about the patch (see what would be changed) 148 git apply --stat grass_code_changes.diff149 150 # dry run to detect errors (should be none):151 git apply --check grass_code_changes.diff157 git apply --stat 174.diff 158 159 # dry run to detect errors (should show no output, i.e. no errors): 160 git apply --check 174.diff 152 161 153 162 # apply patch locally, continue committing as usual 154 git apply grass_code_changes.diff163 git apply 174.diff 155 164 git status 156 # ... commitetc.157 158 # FYI - undo a local patch:165 # ... now comment on PR in GitHub, etc. 166 167 # FYI - here how to undo a local patch: 159 168 git apply --reverse grass_code_changes.diff 160 169 }}}