|
1 | 1 | # Git Cherry-pick update for Downstream Repos |
2 | 2 |
|
3 | | -`git cherry-pick` is a handy tool to directly apply specific commits from one branch or repo to another even when they don't share a git history—especially when you do not want to merge large change sets. This can be helpful when forking another repo or building off an evolving template, such as this guide. Below, we provide a step-by-step guide to updating repositories based on the template guide repo: |
| 3 | +`git cherry-pick` is a handy tool to directly apply specific commits from one branch or repo to another even when they don't share a git history—especially when you do not want to merge large change sets. This can be helpful when forking another repo or building off an evolving template, such the [Collaborative Distributed Science Guide](https://github.com/Imageomics/Collaborative-distributed-science-guide). Below, we provide a step-by-step guide to updating repositories based on updating this repo from the template guide repo: |
4 | 4 |
|
5 | 5 | !!! tip "Be Prepared!" |
6 | 6 | Before you start, you should know which commits are going to be pulled from the template repo. Collect their hashes in a separate text file; be sure to list them in chronological order, so they can be applied correctly. |
|
19 | 19 | ``` |
20 | 20 |
|
21 | 21 | !!! note |
22 | | - If you haven't added this template repo as a remote yet, you will only see the current repo options (`origin`): |
| 22 | + If you haven't added the template repo as a remote yet, you will only see the current repo options (`origin`): |
23 | 23 |
|
24 | 24 | ```console |
25 | | - origin git@github.com:Imageomics/Imageomics-guide.git (fetch) |
26 | | - origin git@github.com:Imageomics/Imageomics-guide.git (push) |
| 25 | + origin git@github.com:ABC-Center/ABC-guide.git (fetch) |
| 26 | + origin git@github.com:ABC-Center/ABC-guide.git (push) |
27 | 27 | ``` |
28 | 28 |
|
29 | 29 | In which case, run the following to add the template guide as an available remote under the title `upstream`: |
|
35 | 35 | After running `git remote -v`, you should then see |
36 | 36 |
|
37 | 37 | ```console |
38 | | - origin git@github.com:Imageomics/Imageomics-guide.git (fetch) |
39 | | - origin git@github.com:Imageomics/Imageomics-guide.git (push) |
| 38 | + origin git@github.com:ABC-Center/ABC-guide.git (fetch) |
| 39 | + origin git@github.com:ABC-Center/ABC-guide.git (push) |
40 | 40 | upstream git@github.com:Imageomics/Collaborative-distributed-science-guide.git (fetch) |
41 | 41 | upstream git@github.com:Imageomics/Collaborative-distributed-science-guide.git (push) |
42 | 42 | ``` |
|
0 commit comments