Skip to content

Commit 8550cd7

Browse files
authored
fixup readme and add new config recommends
1 parent 5368a7d commit 8550cd7

File tree

1 file changed

+70
-31
lines changed

1 file changed

+70
-31
lines changed

README.md

Lines changed: 70 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,70 @@ Either install this into your project's `Plugins/` folder, or if you would like
2929
rename `Engine/Plugins/Developer/GitSourceControl.uplugin` to `Engine/Plugins/Developer/GitSourceControl.uplugin.disabled`
3030
and then install this plugin to the `Engine/Plugins` folder.
3131

32-
## Note about .gitattributes
32+
### Note about .gitattributes and .gitignore
3333

3434
This plugin requires explicit file attributes for `*.umap` and `*.uasset`, rather than other approaches of using wildcards for the content folder (`Content/**`).
3535

3636
See [our own `.gitattributes`](https://github.com/ProjectBorealis/PBCore/blob/main/.gitattributes) for an example.
3737

38-
You may also want to check out [our robust `.gitignore`](https://github.com/ProjectBorealis/PBCore/blob/main/.gitignore) too
38+
You may also want to check out [our robust `.gitignore`](https://github.com/ProjectBorealis/PBCore/blob/main/.gitignore) too.
3939

40-
## Note about authentication
40+
### Note about authentication
4141

4242
We would highly recommend using HTTPS authentication for your Git repo.
4343

4444
This allows a single credential path to be used, with the robust and fast HTTPS support in LFS.
4545

4646
With [Git Credential Manager](https://github.com/GitCredentialManager/git-credential-manager), authenticating with HTTPS is also much easier, with a GUI available to authenticate with any Git provider.
4747

48-
## Status Branches - Required Code Changes (For Programmers)
48+
## Note about Unreal configuration
49+
50+
### Required
51+
52+
* The plugin makes the assumption that files are always explicitly added. We made this decision because it is beneficial for performance and our workflows. In `Config/DefaultEditorPerProjectUserSettings.ini`
53+
54+
```ini
55+
[/Script/UnrealEd.EditorLoadingSavingSettings]
56+
bSCCAutoAddNewFiles=False
57+
```
58+
59+
### Recommended
60+
61+
* As a general source control usability improvement, you can enable new checkout features in `Config/DefaultEditorPerProjectUserSettings.ini`. To enable auto-checkout on modification, which is great for OFPA and other workflows (but requires user attention to excessive locking of content):
62+
63+
```ini
64+
[/Script/UnrealEd.EditorLoadingSavingSettings]
65+
bAutomaticallyCheckoutOnAssetModification=False
66+
bPromptForCheckoutOnAssetModification=True
67+
```
68+
69+
* OR, to enable auto-prompt on modification, which is a bit more upfront/intrusive in user flows, but more conservative with locking, flip the settings:
70+
71+
```ini
72+
[/Script/UnrealEd.EditorLoadingSavingSettings]
73+
bAutomaticallyCheckoutOnAssetModification=False
74+
bPromptForCheckoutOnAssetModification=True
75+
```
76+
77+
---
78+
79+
* As another general usability improvement, you can set the editor to load any checked out packages for faster loading. In `Config/DefaultEditorPerProjectUserSettings.ini`:
80+
81+
```ini
82+
[/Script/UnrealEd.EditorPerProjectUserSettings]
83+
bAutoloadCheckedOutPackages=True
84+
```
85+
86+
---
87+
88+
* In `Config/DefaultEngine.ini` you can set this option to `1` to disable a feature that is unnecessary for Git (for performance):
89+
90+
```ini
91+
[SystemSettingsEditor]
92+
r.Editor.SkipSourceControlCheckForEditablePackages=1
93+
```
94+
95+
## Status Branches - Required Code Changes
4996

5097
Epic Games added Status Branches in 4.20, and this plugin has implemented support for them. See [Workflow on Fortnite](https://youtu.be/p4RcDpGQ_tI?t=1443) for more information. Here is an example of how you may apply it to your own game.
5198

@@ -83,6 +130,15 @@ UnrealEdEngine=/Script/MyModule.MyEdEngine
83130
5. In this example, `origin/promoted` is the highest tested branch. Any changes in this branch are asset changes that do not need testing, and get automatically merged down to `origin/develop`. This may be extended to involve multiple branches, like `origin/trunk`, `origin/main`, or whatever you may prefer, where changes may be cascaded from most-stable to least-stable automatically. With this paradigm, changes from less-stable branches are manually promoted to more-stable branches after a merge review.
84131
**NOTE**: The second argument in `RegisterStateBranches` is Perforce specific and is ignored, but is meant to point to the relative content path.
85132

133+
6. If you decide to implement the status branch code in a editor-only module, ensure the loading phase in the editor module is set to `Default` in your .uproject settings, like so: (Otherwise, the editor will likely have difficulty finding your subclass'd UUnrealEdEngine class.)
134+
```json
135+
{
136+
"Name": "MyTestProjectEditor",
137+
"Type": "Editor",
138+
"LoadingPhase": "Default"
139+
}
140+
```
141+
86142
## Status Branches - Conceptual Overview
87143

88144
This feature helps ensure you're not locking and modifying files that are out-of-date.
@@ -95,52 +151,59 @@ If a user is on **any** branch, regardless if it's tracking a branch included in
95151
![Status Branch Overview](https://i.imgur.com/bY3igQI.png)
96152

97153
#### Note:
154+
98155
It's important to only release file locks after changes have been pushed to the server. The system has no way to determine that there are local changes to a file, so if you modify a locked file it's imperative that you push the changes to a remote branch included in the 'status branch' list so other users can see those changes and avoid modifying a stale file. Otherwise, you'll want to keep the file locked!
99156

100157
Additionally, if you're switching back and forth between two or more branches locally you'll need to keep track of what branch you've made changes to locked files, as the system will not prevent you from modifying the same locked file on multiple different branches!
101158

102159
#### Real-world example of the 'status branch' feature:
160+
103161
* The user has checked out the `develop` branch, but there is an up-stream change on `origin/develop` for `FirstPersonProjectileMaterial`, indicated with the **yellow** exclamation mark.
104162
* There are also newer upstream changes on the `promoted` branch, indicated with the **red** exclamation mark. (NOTE: The plugin does not currently report the branch name the changes are on.)
105163

106164
![Status Branch Feature in Action](https://iili.io/1HqPhg.webp)
107-
108-
165+
109166
## General In-Editor Usage
110-
***
111167

112168
### Connecting to source control:
169+
113170
Generally speaking, the field next to `Uses Git LFS 2 File Locking workflow` should match your Git server's `User Name`, like so:
114171
(If you find that the checkmark turns blue shortly after checking out a file, then the LFS name is incorrect, update it to the name it says checked out the file)
115172

116173
![Connecting to Source Control](https://iili.io/1HzKep.webp)
117174

118175
### Checking out (locking) one or more assets:
176+
119177
You can lock individual files or you can hold `shift` to select and lock multiple at once, which can be quite a bit faster than locking them individually.
120178

121179
![Checking out Multiple Assets](https://iili.io/1HYog9.webp)
122180

123181
### Unlocking one or more un-changed assets:
182+
124183
You can unlock individual files or you can hold `shift` to select and unlock multiple at once, which can be quite a bit faster than unlocking them individually.
125184

126185
![Checking out Multiple Assets](https://iili.io/1HYzJe.webp)
127186

128187
### Locking every asset within a folder:
188+
129189
You can lock every file in a folder by right clicking on the folder and clicking `Check Out`.
130190

131191
![Lock every asset in a folder](https://iili.io/1HYCfS.webp)
132192

133193
### Viewing locks:
194+
134195
View the owner of a file lock simply by hovering over the asset icon. Your locked files have a **red** check-mark, other user's locks will show up with a **blue** checkmark.
135196

136197
![Viewing file locks](https://iili.io/1HYn07.webp)
137198

138199
### Pulling latest from within the editor:
200+
139201
You can pull the latest changes from your currently checked-out branch within the editor. This doesn't always work smoothly, but effort has been made to improve this process. It is still recommended to always save changes before doing this, however.
140202

141203
![Pulling latest](https://iili.io/1HhumN.webp)
142204

143205
### Submitting changes up-stream:
206+
144207
`Submit to source control` will create a local commit, push it, and release your file lock.
145208
(While you cannot check out branches within the plugin, it is fully branch-aware! In this scenario, the user has checked out the `develop` branch, so their change is pushed to `origin/develop`.)
146209

@@ -149,27 +212,3 @@ You can pull the latest changes from your currently checked-out branch within th
149212
## Additional Resources
150213

151214
You can learn more about how we set up our Git repository at [the PBCore wiki](https://github.com/ProjectBorealis/PBCore/wiki).
152-
153-
154-
## Additional Tips (For Programmers)
155-
***
156-
157-
* In `Config/DefaultEditorPerProjectUserSettings.ini` you may wish to modify the following (Depending on your usage, you may wish to set either to `True`):
158-
```ini
159-
[/Script/UnrealEd.EditorLoadingSavingSettings]
160-
bAutomaticallyCheckoutOnAssetModification=False
161-
bPromptForCheckoutOnAssetModification=True
162-
```
163-
* In `Config/DefaultEngine.ini` you can set this option to `1` to disable a feature that is unnecessary for Git:
164-
```ini
165-
[SystemSettingsEditor]
166-
r.Editor.SkipSourceControlCheckForEditablePackages=1
167-
```
168-
* If you decide to implement the status branch code in a editor-only module, ensure the loading phase in the editor module is set to `Default` in your .uproject settings, like so: (Otherwise, the editor will likely have difficulty finding your subclass'd UUnrealEdEngine class.)
169-
```json
170-
{
171-
"Name": "MyTestProjectEditor",
172-
"Type": "Editor",
173-
"LoadingPhase": "Default"
174-
}
175-
```

0 commit comments

Comments
 (0)