Commit e78fa68a authored by French, Robert's avatar French, Robert
Browse files

Slides for using remotes

Add PDF slides
parent d35b558e
# Feb 9: Using Remotes to Choose what you Share
**Thursday 2/9, 9:00am in JICS Auditorium (5100 RM 128)**
<!-- $theme: gaia -->
<!-- *template: invert -->
<!-- $size: 16:9 -->
# Remote Repositories
### The Crown Jewel of Distributed Version Control
##### Robert D. French
Not all of us want to share every single change with the outside world. For
some projects, it may be appropriate to maintain two repositories -- one for
internal development, and one for publishing stable releases with the outside
world.
---
<!-- page_number: true -->
## What is a Remote?
In this workshop, we'll go over a basic strategy for maintaing separate public
and private copies of the same codebase. This will give us the opportunity to
talk about:
* It's just another git repository
* It's just another git repository
* It's just another git repository
* Defining and connecting to remote repositories
* Keeping branches in sync with different remotes
* Using Gitlab's "Repository Sync" feature to automatically pull changes
---
### Seriously, what is a Remote?
* It is a git repository, usually on another system, with which you can exchange commits
* Most common use case: Central, shared repo (on GitLab or GitHub)
* But git lets you do some *wild things:*
* Deploy apps by pushing to remotes on webservers (Heroku)
* Pull commits directly from your co-worker's laptop (SSH keys)
* Exchange repositories over email or portable drives (Git Bundles)
---
### Using Remotes to contribute a Git It Together talk
1. Fork the `git-it-together/meetings` repo
2. Configure your remotes to push to the new fork
3. Push to *your personal remote*
4. Open a Merge Request to the official repo
---
## Defining and Connecting to Remotes
<!-- *template: invert -->
<!-- *page_number: false -->
---
### What remotes are already defined?
```bash
$ git remote -v
origin git@code.ornl.gov:rf9/meetings.git (fetch)
origin git@code.ornl.gov:rf9/meetings.git (push)
```
* Let's add another one
```bash
$ git remote add official git@code.ornl.gov:git-it-together/meetings.git
```
* And rename `origin` to `rf9`:
```bash
$ git remote rename origin rf9
```
---
### Different Remotes for Different Purposes
```bash
$ git remote -v
rf9 git@code.ornl.gov:rf9/meetings.git (fetch)
rf9 git@code.ornl.gov:rf9/meetings.git (push)
official git@code.ornl.gov:git-it-together/meetings.git (fetch)
official git@code.ornl.gov:git-it-together/meetings.git (push)
```
* Now we can push changes to `rf9`, and then submit a Merge Request to `official`.
* Let's make a small change and walk through a Merge Request interactively
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment