Skip to content

Commit 397ee0e

Browse files
Merge pull request #36 from devinekask/feature/starterfiles
Feature/starterfiles
2 parents 497eecf + 868fd04 commit 397ee0e

File tree

7 files changed

+58
-0
lines changed

7 files changed

+58
-0
lines changed

.markdownlint.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"no-inline-html": false,
3+
"line-length": false
4+
}

src/content/docs/git/basics/git-04-undo.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
title: Undo
33
---
44

5+
<details>
6+
<summary>Looking for the starting files?</summary>
7+
8+
The ideal way to follow this walkthrough is to go over the previous topics first. If you want to skip to this topic, you can [download the starting files here.](https://github.com/devinekask/workflows-git-steps/archive/refs/heads/step/track-commit.zip)
9+
10+
Be aware that you will have to initialize a git repository first via `git init` in the unzipped folder.
11+
12+
</details>
13+
514
Whoops, we messed up, what now?
615

716
## Undo changes after staging

src/content/docs/git/basics/git-05-ignore.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
title: Ignore files
33
---
44

5+
<details>
6+
<summary>Looking for the starting files?</summary>
7+
8+
The ideal way to follow this walkthrough is to go over the previous topics first. If you want to skip to this topic, you can [download the starting files here.](https://github.com/devinekask/workflows-git-steps/archive/refs/heads/step/undo.zip)
9+
10+
Be aware that you will have to initialize a git repository first via `git init` in the unzipped folder.
11+
12+
</details>
13+
514
It won't be necessary to keep track of all the files in a project folder via Git. For example, it is not a good idea to track a `node_modules` (see later) or `uploads` folder in your repository. Also hidden system files, such as `.DS_Store` are of no use in a repository.
615

716
Let us work with an example. Create a dummy project like this:

src/content/docs/git/basics/git-06-branches.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
title: Branching
33
---
44

5+
<details>
6+
<summary>Looking for the starting files?</summary>
7+
8+
The ideal way to follow this walkthrough is to go over the previous topics first. If you want to skip to this topic, you can [download the starting files here.](https://github.com/devinekask/workflows-git-steps/archive/refs/heads/step/ignore.zip)
9+
10+
Be aware that you will have to initialize a git repository first via `git init` in the unzipped folder.
11+
12+
</details>
13+
514
You can also use branches via Git.
615

716
You can use branches to:

src/content/docs/git/collaboration/collab-01-github-push.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ Remember to choose the SSH option (instead of the HTTPS option) when cloning a r
100100

101101
## Create repository & first push
102102

103+
<details>
104+
<summary>Looking for the starting files?</summary>
105+
106+
The ideal way to follow this walkthrough is to go over the previous topics first. If you want to skip to this topic, you can [download the starting files here.](https://github.com/devinekask/workflows-git-steps/archive/refs/heads/step/branches.zip)
107+
108+
Be aware that you will have to initialize a git repository first via `git init` in the unzipped folder.
109+
110+
</details>
111+
103112
Login to your GitHub account, and click the "New repository" button. Choose a name for your repository and click the "Create Repository" button.
104113

105114
Don't add a `readme.md` or a `.gitignore` file yet. Since we will sync this repo with an existing one (the one we created in a previous chapter) things will get complicated if there are files on both ends. (It is definitely possible to fix this, but we won't go in to that now) If you would start completely from scratch, this wouldn't be an issue.

src/content/docs/git/collaboration/collab-02-pull-rebase.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
title: Pull
33
---
44

5+
<details>
6+
<summary>Looking for the starting files?</summary>
7+
8+
The ideal way to follow this walkthrough is to go over the previous topics first. If you want to skip to this topic, you can [download the starting files here.](https://github.com/devinekask/workflows-git-steps/archive/refs/heads/step/github-push.zip)
9+
10+
Be aware that you will have to initialize a git repository first via `git init` in the unzipped folder.
11+
12+
</details>
13+
514
## Pull existing repository
615

716
Once a repository has been created, and is on a server like GitHub, you can also download it from other computers/locations. Downloading the repository for the first time is done via the `git clone` command. From then on you can get updates via the `git pull` command. `git pull` is the inverse of `git push`, and you will use it to pull in updates you don't already have locally.

src/content/docs/git/collaboration/collab-03-merge-conflicts.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
title: Merge conflicts
33
---
44

5+
<details>
6+
<summary>Looking for the starting files?</summary>
7+
8+
The ideal way to follow this walkthrough is to go over the previous topics first. If you want to skip to this topic, you can [download the starting files here.](https://github.com/devinekask/workflows-git-steps/archive/refs/heads/step/pull-rebase.zip)
9+
10+
Be aware that you will have to initialize a git repository first via `git init` in the unzipped folder.
11+
12+
</details>
13+
514
So far we have only made changes in separate files. However, it can happen that you have made changes to the same file with 2 people, and that a conflict occurs.
615

716
In the `project` folder, edit the text in `hello.txt` and push it to the remote repository:

0 commit comments

Comments
 (0)