@@ -136,41 +136,60 @@ upstream https://github.com/Layr-Labs/eigenlayer-contracts.git (fetch)
136
136
upstream https://github.com/Layr-Labs/eigenlayer-contracts.git (push)
137
137
```
138
138
139
- ### Make Sure Your Fork Is In Sync With Upstream
140
139
141
- Go to ` main ` branch in your fork repository
140
+ ### Create Your PR to Upstream Branches
141
+
142
+ The following applies if you submit a PR to upstream branch of either ` main ` or ` release-dev/* ` , which will refer to as ` <upstream-target-branch> `
143
+
144
+ Create a local branch from the upstream branch:
142
145
143
146
```
144
- git checkout main
147
+ git checkout -B <my-local-feature-branch> upstream/<upstream-target-branch>
145
148
```
146
149
147
- Fetch latest update from upstream
150
+ Make your changes, then commit:
148
151
149
152
```
150
- git fetch upstream
153
+ git add .
154
+ git commit -m "your message"
151
155
```
152
156
153
- Rebase your ` main ` to the upstream ` main `
157
+ Push to your fork:
154
158
155
159
```
156
- git rebase upstream/main
160
+ git push -u origin <my-local-feature-branch>
157
161
```
158
162
159
- Push to your fork repository
163
+ Go to GitHub, and open a PR from:
160
164
161
165
```
162
- git push
166
+ your-fork:<my-local-feature-branch>
167
+ **to**
168
+ Layr-Labs/eigenlayer-contracts:<upstream-target-branch>
163
169
```
164
170
165
- Now ` main ` in your fork repository should match the ` main ` in EigenLayer repository.
171
+ GitHub should auto-detect this if branches match.
172
+
173
+ If you already have an open PR for this branch, just push more commits to ` <my-local-feature-branch> ` , and the PR will update.
174
+
175
+
176
+ ### Keeping Your Branch Updated With Upstream
177
+
178
+ To stay in sync with upstream's ` <upstream-target-branch> ` , whether it's ` main ` or ` release-dev/* ` :
179
+
180
+ ```
181
+ git fetch upstream
182
+ git checkout <my-local-feature-branch>
183
+ git rebase upstream/<upstream-target-branch>
184
+
185
+ # or use merge if you prefer
186
+ # git merge upstream/<upstream-target-branch>
187
+
188
+ git push -f origin <my-local-feature-branch>
189
+ ```
166
190
167
- ### Create Your PR
191
+ Use --force only if you're rebasing (not with merges).
168
192
169
- 1 . Create a new branch from your target upstream branch in your fork repository
170
- 2 . Make your code changes
171
- 3 . Commit your changes
172
- 4 . Push to your forked repository
173
- 5 . Create a PR from your branch to the appropriate branch in the upstream repository
174
193
175
194
### PR Title Format
176
195
0 commit comments