@@ -96,7 +96,7 @@ This command creates a commit from the changes in staging, and adds associated c
96
96
97
97
** Note about commit messages:**
98
98
- Messages should be brief but informative. "fix bug" won't be too useful a year later.
99
- - Current standard is to use imperative mood, "write an awesome function" instead of "wrote and awesome function"
99
+ - Current standard is to use imperative mood, "write an awesome function" instead of "wrote an awesome function"
100
100
- More info in this post: https://cbea.ms/git-commit/
101
101
102
102
### ** To do this in VSCode:**
@@ -145,9 +145,11 @@ git pull upstream main
145
145
Now, any changes that have been merged into "Parent" should also be reflected in your local repo.
146
146
147
147
### ** To do this in VSCode:**
148
- On the "Source Control" tab, pull from ` upstream ` :
148
+ On the "Source Control" tab, pull from the main branch of ` upstream ` :
149
149
![ 18_vscode_fetchupstream] ( https://user-images.githubusercontent.com/91637560/176327614-5f9bf285-5f6a-4497-bb27-93a9ee59e815.png )
150
150
![ 18_vscode_fetchupstream2] ( https://user-images.githubusercontent.com/91637560/176327658-91156793-9ee5-4526-a5ae-d470704ca1ff.png )
151
+ ![ 18_vscode_fetchupstream_main] ( https://user-images.githubusercontent.com/91637560/176515466-e5e505ee-cde4-475e-9623-0b64d238ba6b.png )
152
+
151
153
152
154
Your local repo is now up-to-date with the "Parent" repo. Sync these changes to make your remote repo up-to-date with "Parent" as well.
153
155
@@ -177,7 +179,7 @@ The text within the `<<<<<<<` and the `>>>>>>>` are the conflicting areas.
177
179
Anything between ` <<<<<<< HEAD ` and ` ======= ` represent what you had in the file, before trying to merge in any new changes.
178
180
Anything between ` ======= ` and ` >>>>>>> ` represent what the incoming changes are.
179
181
You can choose to accept what you had, the incoming changes, both, or a mixture of the two.
180
- For our example, let's choose to accept both, so remove the any lines with ` <<<<<<< HEAD ` , ` ======= ` and ` >>>>>>> `
182
+ For our example, let's choose to accept both changes , so remove the any lines with ` <<<<<<< HEAD ` , ` ======= ` and ` >>>>>>> `
181
183
Your file should now look like:
182
184
```
183
185
This file contains some text
@@ -190,3 +192,22 @@ Now, to finish up the merge, we need to add/commit our changes.
190
192
git add . && git commit -m "resolve merge conflict, keep both changes"
191
193
```
192
194
Your merge conflict has been successfully resolved!
195
+
196
+ ### ** To do this in VSCode:**
197
+ On the "Source Control" tab, pull from the patrick_branch of ` upstream ` :
198
+ ![ 18_vscode_fetchupstream] ( https://user-images.githubusercontent.com/91637560/176327614-5f9bf285-5f6a-4497-bb27-93a9ee59e815.png )
199
+ ![ 18_vscode_fetchupstream2] ( https://user-images.githubusercontent.com/91637560/176327658-91156793-9ee5-4526-a5ae-d470704ca1ff.png )
200
+ ![ 18_vscode_fetchupstream_patrick] ( https://user-images.githubusercontent.com/91637560/176515741-3dc5fa6a-553a-4ce5-9778-34ce1066b314.png )
201
+
202
+ You will get this error:
203
+ ![ 19_vscode_mergeconflict] ( https://user-images.githubusercontent.com/91637560/176515903-ab107e97-da14-4f05-8e19-d7fdc55b5296.PNG )
204
+
205
+ Use "Compare Changes" to get a side-by-side comparison of the changes (current changes in red, incoming changes in green):
206
+ ![ 19_vscode_mergeconflict_comparechanges] ( https://user-images.githubusercontent.com/91637560/176516013-fe1fe0a3-57b2-40fa-ab77-ee00ed54c5fd.PNG )
207
+
208
+ For our example, let's choose to accept both changes:
209
+ ![ 19_vscode_mergeconflict_acceptboth] ( https://user-images.githubusercontent.com/91637560/176516212-c7b47282-ed4a-47cb-98ff-837f2b0e34d0.png )
210
+
211
+ You have successfully merged the changes in your local repo! Be sure to stage, commit, and sync the changes so they are reflected in your remote repo.
212
+
213
+
0 commit comments