You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/routes/contribute/git-practices/+page.svx
+18-29Lines changed: 18 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -7,43 +7,34 @@ description: "This page is an introduction to our Git practices a page for the w
7
7
8
8
**Last Updated:** 12-13-2024
9
9
10
-
This page is an introduction to how we use Git in the wiki repository. In order to keep the wiki consistent and
10
+
This page is an introduction to how we use Git in the [wiki repository](https://github.com/Datapack-Hub/wiki). In order to keep the wiki consistent and
11
11
reputable, we have a few rules that we follow.
12
12
13
13
Git provides a lot of features that are great for collaboration, and we try to use them as much as possible.
14
14
15
-
## Branching and PRs
15
+
:::info
16
+
This guide assumes you already have experience using Git before.
17
+
:::
16
18
17
-
Branches are a great way to work on the wiki without introducing unfinished pages, changes, etc. Branches allow you to
18
-
work on a page without affecting the main (production) branch and allow us to review your changes before they are
19
-
merged.
19
+
## Forking and PRs
20
20
21
-
### Branch Naming
21
+
Forks are a great way to work on the wiki without introducing unfinished pages, changes, etc. to main.
22
+
You can click the ["Fork"](https://github.com/Datapack-Hub/wiki/fork) button in the top right corner of the repository to
23
+
create a fork of the repository. This will create a complete copy of the repository that you can work on.
22
24
23
-
We use `kebab-case` for branch names meaning the branch name should be all lowercase with hyphens to
24
-
separate words. For example, if you are working on a page called "Adding New Features", the branch name should be
25
-
`adding-new-features`.
26
-
27
-
### Branch Workflow
28
-
29
-
When you are ready to merge your changes into the main branch, create a pull request (PR) and assign it to a
30
-
reviewer. The reviewer will review your changes and either approve or request changes. Once approved, the changes will
31
-
be merged into the main branch.
32
-
33
-
We recommend deleting the branch after it has been merged into the main branch. This will keep the repository clean and
34
-
reduce confusion. An exception to this is if you are working on a very large feature that will take a while to merge, or
35
-
if you plan to merge multiple features from one branch.
25
+
Once you have forked the repository, you can clone it to your local machine.
36
26
37
-
## Forking
27
+
When it comes time to merge your changes, you can create a pull request, and a wiki contributor will review your contribution.
38
28
39
-
Forking is another way to work on the wiki without affecting the main branch. This is useful if you are a first-time
40
-
contributor and don't have write access. You can click the "Fork" button in the top right corner of the repository to
41
-
create a fork of the repository. This will create a copy of the repository that you can work on.
29
+
## Branches
42
30
43
-
Once you have forked the repository, you can clone it to your local machine.
31
+
Branches are useful additions to help separate features in your fork. We use `kebab-case` for branch names meaning the branch
32
+
name should be all lowercase with hyphens to separate words. For example, if you are working on a page called "Adding New Features",
33
+
the branch name should be `adding-new-features`.
44
34
45
-
When it comes time to merge your changes, you can create a pull request in the same way as you would with a branch, just
46
-
replace the branch name with the name of your fork's branch name.
35
+
We do not recommend you use branches for the main repository, even if you have permissions to.
36
+
Branches in the repository are mainly for upcoming Minecraft versions or huge upcoming reworks, if you believe you
37
+
have a reason to add a branch to the main repository, let a wiki admin know.
47
38
48
39
## Commit Messages
49
40
@@ -63,7 +54,7 @@ Whenever you start working on a new branch or features, pull the latest changes
63
54
will ensure that you have the most up-to-date changes.
64
55
65
56
You will likely run into an issue with the `search.json` file, which is used to generate the search index. This file is
66
-
generated automatically and should not be manually edited. A solution to this is to remove the `search.json` file and
57
+
generated automatically and should not be manually edited. A solution to this is to remove the `search.json` file and optionally
67
58
run the search index generation script. This will regenerate the file and you can commit it.
68
59
69
60
```
@@ -76,8 +67,6 @@ bun ./gen_search_indexes.js
76
67
77
68
## Other Important Information
78
69
79
-
- Always use the `main` branch as the base branch for your PRs. This will reduce the chances of conflicts and ensure
80
-
that your changes are merged correctly.
81
70
- Make a description of your changes in your PR.
82
71
- Reviewers: Proofread changes before approving them.
83
72
- Reviewers: It's not required, but it's recommended the changes follow American English for consistency sake.
0 commit comments