Skip to content

Commit d9c6daf

Browse files
committed
2 parents a43676e + 8bdc286 commit d9c6daf

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lectures/software_engineering/version_control.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ We assume that you have followed the {doc}`VS Code <../software_engineering/tool
4545
1. Make sure you create an account on [GitHub.com](http://github.com/).
4646
* If you are a student, consider signing up for the GitHub [Student Developer Pack](https://education.github.com/pack/) which gives you free [GitHub Pro](https://docs.github.com/en/get-started/learning-about-github/githubs-products#github-pro)
4747
* Otherwise, see if you qualify for a free [Research or Educator Plan](https://help.github.com/articles/about-github-education-for-educators-and-researchers/) which gives you free [GitHub Team](https://docs.github.com/en/get-started/learning-about-github/githubs-products#github-team)
48-
2. Ensure that [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git/) is installed (as it likely was in the {doc}`getting started <../getting_started_julia/getting_started>`
48+
2. Ensure that [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git/) is installed (as it likely was in the {doc}`getting started <../getting_started_julia/getting_started>`)
4949
3. Setup your git username, and change default line-endings if on Windows
5050
1. Opening a terminal (on Windows you can use a powershell or the new "Git Bash" installed in the previous step)
5151
2. Running the following, where the first two lines are not required on linux and OS/X, and you should replace the email and name in the final lines
@@ -139,11 +139,11 @@ We can then configure repository options as such
139139
In this case, we're making a public repo `github.com/USERNAME/example_repository` where `USERNAME` is your GitHub account name. The options chosen are:
140140
- Add in a `README.md`.
141141
- License under the MIT open-source License.
142-
- Ignore Julia compilation byproducts in the `.gitignore`
142+
- Ignore Julia compilation byproducts in the `.gitignore`.
143143
- Leave off support for the Marketplace Apps `Codecov`, which we will discuss further in the {doc}`testing lecture <../software_engineering/testing>` lecture.
144144

145145
```{note}
146-
You can also add an existing folder as a new repository on github, where you can use the VS Code features to [initialize and publish](https://code.visualstudio.com/docs/editor/versioncontrol#_initialize-a-repository) a repository to GitHub. Otherwise, the [instructions are more involved](https://docs.github.com/en/github/importing-your-projects-to-github/importing-source-code-to-github/.
146+
You can also add an existing folder as a new repository on github, where you can use the VS Code features to [initialize and publish](https://code.visualstudio.com/docs/editor/versioncontrol#_initialize-a-repository) a repository to GitHub. Otherwise, the [instructions are more involved](https://docs.github.com/en/github/importing-your-projects-to-github/importing-source-code-to-github/).
147147
```
148148
(clone_repo)=
149149
### Cloning a Repository
@@ -163,8 +163,8 @@ This dropdown gives us a few options
163163

164164

165165
We will download the repository using the built-in VS Code support.
166-
1. Copy the https URL in that dropdown (e.g. `https://github.com/USERNAME/example_repository.git`)
167-
2. Start VS Code
166+
1. Copy the https URL in that dropdown (e.g. `https://github.com/USERNAME/example_repository.git`).
167+
2. Start VS Code.
168168
3. Use `Ctrl+Shift+P` to open the command bar, and choose `> Git: Clone`
169169
4. At this point, you can paste in the copied URL or choose `Clone from GitHub` and then it will let you select your repositories after logging in.
170170
```{figure} /_static/figures/vs-code-clone.png
@@ -183,7 +183,7 @@ You will see the automatically generated files for the `LICENSE, .gitignore` and
183183
To manually clone this to your desktop, you can start a terminal and use `git clone https://github.com/USERNAME/example_repository.git` within the directory you want to clone it to. After cloning, you can open the folder within VS Code by either
184184
- Within a terminal on your operating system, navigate to that directory and type `code .`
185185
- On Windows if you installed VS Code with the appropriate option, right click on the folder and choose `Open with Code` - trusting the authors as required on opening the folder.
186-
- In the VS Code Menu, choose `File/Open Folder...`
186+
- In the VS Code Menu, choose `File/Open Folder...`.
187187
```
188188

189189
### Making, Committing, and Pushing Changes
@@ -192,7 +192,7 @@ Now that we have the repository, we can start working with it.
192192

193193
Within VS Code, make the following changes:
194194
1. Open the `README.md` and add some text.
195-
2. Add a new file called `some_file.txt` with some text in it. You can do this with the menus, or by right clicking in the Files panel and selecting "New File"
195+
2. Add a new file called `some_file.txt` with some text in it. You can do this with the menus, or by right clicking in the Files panel and selecting "New File".
196196
3. Add another new file called `garbage_file.tmp` with some text in it.
197197
4. Finally, in the `.gitignore`, add `*.tmp` at the end.
198198

@@ -284,7 +284,7 @@ Go back to the desktop VS Code, and you will see that the Git bar at the bottom
284284
```
285285
Notice that the direction of the arrow is the opposite of when we made local modifications. Whereas moving local commits to the server is called a "Push", bringing external changes down to your desktop is called a "Pull".
286286

287-
But before we pull these changes, we will show how Git can automatically merge them - often on the same file, but at different lines of code).
287+
But before we pull these changes, we will show how Git can automatically merge them (often on the same file, but at different lines of code).
288288

289289
On your local VS Code, open the `README.txt` and change the title from `# example_repository` to `# example_repository_modified`. Then save and commit this change with a commit message such as `Local Modification`. It is important that you modified the top line, and not the same one that you changed in the online editor.
290290

@@ -307,7 +307,7 @@ The `.gitignore` is very useful for ensuring that some files are always ignored.
307307
To see this workflow prior to making a commit:
308308
1. Save a change to the `README.md`
309309
2. Open the Git pane, which will show the one modification.
310-
3. Right click on the modification you wish to discard (can be file-by-file)
310+
3. Right click on the modification you wish to discard (can be file-by-file).
311311
```{figure} /_static/figures/vs-code-edits-8.png
312312
:width: 100%
313313
```
@@ -374,7 +374,7 @@ An alternative workflow is to right click on the file, and choose `Accept All Cu
374374

375375
After modifying:
376376
1. Save the file if you have resolved the merge conflict.
377-
2. Choose the `+` next to the modified file in the source control pane, or right click on the file and choose `Stage Changes`
377+
2. Choose the `+` next to the modified file in the source control pane, or right click on the file and choose `Stage Changes`.
378378
3. Add a commit message, commit the file
379379
4. Do a Push to synchronize with the server.
380380

@@ -437,7 +437,7 @@ The checkboxes are common in GitHub to manage project tasks.
437437

438438
Whenever people push to a project you're working on, you'll receive an email notification.
439439

440-
You review individual commits by opening a commits and commenting
440+
You review individual commits by opening a commits and commenting.
441441

442442
```{figure} /_static/figures/git-review.png
443443
:width: 100%

0 commit comments

Comments
 (0)