... | ... | @@ -2577,9 +2577,53 @@ Let us make one final edit. Let us fix the missing output listing in `README.md` |
|
|
3. Run `git add .`
|
|
|
4. Run `git commit -m "Add missing sample output to README"`
|
|
|
|
|
|
---
|
|
|
|
|
|
Let us start with a local repository (repo). [Watch this recorded discussion](https://youtu.be/kwVHt4opmN8).
|
|
|
#### Adding a Remote
|
|
|
|
|
|
Now that we have a repo with actual code... we can:
|
|
|
|
|
|
- Run `git status`.
|
|
|
- Run variants of `git log`.
|
|
|
- Examine changes with `git diff` and `git difftool`.
|
|
|
|
|
|
However, it is about time we added a remote repo. Run
|
|
|
|
|
|
```
|
|
|
git remote -v
|
|
|
```
|
|
|
|
|
|
You will recieve not output. Since we have not set up a remote repo on Github,
|
|
|
GitLab or another service that is expected.
|
|
|
|
|
|
1. I will assume you have an ssh key pair prepared and set up with your
|
|
|
service of choice.
|
|
|
- Github has an [ssh key
|
|
|
guide](https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent).
|
|
|
- GitLab also has an [ssh key guide](https://docs.gitlab.com/ee/ssh/).
|
|
|
2. I will also assume you have an empty repo created with your service of choice.
|
|
|
|
|
|
Now let us add the remote repo.
|
|
|
|
|
|
1. Locate your repos SSH URL. It can usually be found under the *clone* button.
|
|
|
The URL should be in a format similiar to `git@git-community.cs.odu.edu:tkennedy/git-workshop.git`.
|
|
|
2. In your repo run `git remote add origin URL_REPO`.
|
|
|
3. Run `git remote -v`. You should see output simliar to
|
|
|
|
|
|
```
|
|
|
origin git@git-community.cs.odu.edu:tkennedy/git-workshop.git (fetch)
|
|
|
origin git@git-community.cs.odu.edu:tkennedy/git-workshop.git (push)
|
|
|
|
|
|
```
|
|
|
|
|
|
Now it is time to push all of our work.
|
|
|
|
|
|
1. Run `git push -u origin master`
|
|
|
2. Open the web version of your repo (e.g., your exiting Github repo or
|
|
|
GitLab repo) and examine the results.
|
|
|
3. If you would like an existing example... navigate to <https://git-community.cs.odu.edu/tkennedy/git-workshop>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|