Skip to content

Commit d4332a8

Browse files
committed
add how to sync a fork
1 parent 2f27b30 commit d4332a8

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

git_sync_fork.qmd

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: "How to update a fork"
3+
---
4+
5+
## 1. Using GitHub Website
6+
7+
- Click on the "Sync fork" button
8+
9+
![](img/git-syncfork.png)
10+
11+
- Do a `git rebase` on your main branch of your local fork
12+
13+
14+
## 2. Using the Command Line
15+
16+
```bash
17+
# Set the upstream repo of the fork -- To do only once
18+
git remote add upstream https://github.com/UCSB-Library-Research-Data-Services/bren-eds213-data.git
19+
20+
# Check it was added to remotes
21+
git remote -v
22+
23+
# Optional: Switch to your main branch if you were working on a branch
24+
git checkout main
25+
26+
# Pull all the latest commits from the main repo (upstream)
27+
git rebase upstream main
28+
git push origin main
29+
```

img/git-syncfork.png

71.2 KB
Loading

modules/week05/index-05.qmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ title: "Week 5 - I/O, data management & More"
3030

3131
- [Class data GitHub repository](https://github.com/UCSB-Library-Research-Data-Services/bren-eds213-data)
3232

33+
## How to sync your fork
34+
35+
- [How-to sync your fork](../../git_sync_fork.qmd)
36+
3337
## Resources
3438

3539
1. Jeffrey D. Ullman and Jennifer Widom (2008). A First Course in Database Systems. 3rd ed. Upper Saddle River, NJ: Pearson/Prentice Hall.\

0 commit comments

Comments
 (0)