Skip to content
Snippets Groups Projects
Commit 312a9068 authored by Tobias Schlauch's avatar Tobias Schlauch
Browse files

Clearly separate the push and pull parts

parent a899ff2e
No related branches found
No related tags found
1 merge request!4Resolve "Move tagging to episode 10"
......@@ -13,13 +13,14 @@ Please see the original episodes for further details about the introduced topics
## Repositories
- There are different options and use cases for multiple repositories as shown in: [Git-SCM.com/about/distributed](https://git-scm.com/about/distributed)
- Explain that we are using a `shared repository` which is used for synchronizing the work of all involved persons.
## Publish the local Repository in GitLab
- Create an **empty** GitLab project named `planets` and visibility `private` via the [GitLab Web interface](https://gitlab.com/help/gitlab-basics/create-project.md):
- Explain available options & usefulness of description for [`/explore` filter](https://gitlab.com/explore/projects)
- Ask, what happens when the create button is clicked ([`git init --bare`](https://swcarpentry.github.io/git-novice/fig/git-freshly-made-github-repo.svg)).
- `Initialize ... README` would cause "Initial commit" (this option should be unchecked!)
## Remotes
- Explain the concept of **Remotes**
- Preview [`clone`, `fetch` vs. `pull`, `push` commands][remote-overview]
- Copy URL from newly created repository:
......@@ -31,15 +32,15 @@ Please see the original episodes for further details about the introduced topics
- Show that a new remote was added:
- `git remote -v`
- Explain `fetch` and `push`
### Push and Pull
- Push the recent changes to the new repository:
- `git push`
- Try only `git push`, note `--set-upstream` hint & apply it
- **Exercise:** [Push vs. Commit](https://swcarpentry.github.io/git-novice/07-github/index.html#push-vs-commit)
- Show push result in GitLab:
- Explain usefulness of good commit messages for `History` and `Blame` views
## Change the remote Repository and synchronize locally
- Create the file `venus.txt` via the GitLab Web interface:
- Add line: `Wolfman will appreciate the absence of moons`
- Set `Commit message` to `"Start notes on Venus as a base"`
......@@ -47,10 +48,13 @@ Please see the original episodes for further details about the introduced topics
- Change the file `mars.txt` via the GitLab Web interface:
- Add line: `We have to bring our own oxygen`
- Set `Commit message` to `"Add notes about Mars' atmosphere"`
- Compare GitLab-`Graph` with local `git log --oneline`
- `git fetch` and `git status` => "behind"
- `git log --oneline --all`
- Pull and show log and `git status` => "up to date with 'origin/master'"
- Fetch the changes
- `git fetch`
- `git log --oneline --all` and compare with the `Graph` in GitLab
- `git status` => "behind"
- Integrate changes into the local `master` branch
- `git pull`
- `git status` => "up to date with 'origin/master'"
- Highlight difference to **working copies** in SVN
- Explain that all changes were included **without** merge commit ("fast-forward")
- Show [Atlassian's "Fast Forward Merge" figure](https://www.atlassian.com/git/tutorials/using-branches/git-merge)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment