You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: forking_workflow.md
+46-2Lines changed: 46 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,11 +26,13 @@ The steps through this demo are:
26
26
6. Fetch changes from the parent repo to your local repo
27
27
7. (Potentially) Resolve merge conflicts
28
28
29
+
29
30
## 1. Fork this "Parent" Repo to create a "Forked" Repo
30
31
Say there is an existing remote repository that belongs to some organization, and you'd like to start development on it, usually the first thing to do would be to create a "fork" of this repository for yourself. This provides you with a repository on Github that is a clone of its "parent", where you can do any type of development and testing on without affecting the parent.
31
32
32
33
For this tutorial, you can fork this repo with the "fork" button on Github:
33
34
<imgwidth="1000"alt="Screen Shot 2022-06-27 at 7 00 30 PM"src="https://user-images.githubusercontent.com/97498519/176095938-ef63421c-a878-426b-bcfb-2a3e736d3b2c.png">
35
+
34
36
You have now successfully "forked" the `cnc_github_tutorial` repo, and created a new repo that is `<YOUR_USERNAME>/cnc_github_tutorial`
The URL can always be found under the "Clone" Section of the Github page of your "forked" repo:
43
45
<imgwidth="800"alt="Screen Shot 2022-06-27 at 9 42 45 AM"src="https://user-images.githubusercontent.com/97498519/175992957-a6794a57-b257-474e-b2ef-73859bfe40d2.png">
46
+
44
47
Once cloned, you should have a directory `cnc_github_tutorial` in your local filesystem. Run `git status` to verify that the directory is a git repository, and that you are on the `main` branch. An example output:
45
48
```
46
49
Patricks-MacBook-Pro:cnc_github_tutorial patrick$ git status
@@ -53,22 +56,63 @@ nothing to commit, working tree clean
This will tell your local git repo about another remote repo, and name it upstream. This will come in handy when there are changes to the parent repo you want to keep track of locally.
59
+
This will tell your local git repo about another remote repo, and name it upstream. This will come in handy when there are changes to the "Parent" repo you want to keep track of locally.
In your local repository, feel free to make any changes you'd like. For simplicity, you can create a new file `<YOUR_NAME>_test.txt` and add some text to it. Once that is saved, remember to `git add` and `git commit` your changes:
60
87
```
61
88
git add . && git commit -m "created new file"
62
89
```
63
90
91
+
### **To do this in VSCode:**
92
+
93
+
Find the "Source Control" tab on the left panel and select the file you have created/modified to see a side-by-side comparison of the changes:
0 commit comments