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: README.md
+70-31Lines changed: 70 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -29,23 +29,70 @@ Either install this into your project's `Plugins/` folder, or if you would like
29
29
rename `Engine/Plugins/Developer/GitSourceControl.uplugin` to `Engine/Plugins/Developer/GitSourceControl.uplugin.disabled`
30
30
and then install this plugin to the `Engine/Plugins` folder.
31
31
32
-
## Note about .gitattributes
32
+
###Note about .gitattributes and .gitignore
33
33
34
34
This plugin requires explicit file attributes for `*.umap` and `*.uasset`, rather than other approaches of using wildcards for the content folder (`Content/**`).
35
35
36
36
See [our own `.gitattributes`](https://github.com/ProjectBorealis/PBCore/blob/main/.gitattributes) for an example.
37
37
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.
39
39
40
-
## Note about authentication
40
+
###Note about authentication
41
41
42
42
We would highly recommend using HTTPS authentication for your Git repo.
43
43
44
44
This allows a single credential path to be used, with the robust and fast HTTPS support in LFS.
45
45
46
46
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.
47
47
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):
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.
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.
84
131
**NOTE**: The second argument in `RegisterStateBranches` is Perforce specific and is ignored, but is meant to point to the relative content path.
85
132
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
+
86
142
## Status Branches - Conceptual Overview
87
143
88
144
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
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!
99
156
100
157
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!
101
158
102
159
#### Real-world example of the 'status branch' feature:
160
+
103
161
* 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.
104
162
* 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.)
105
163
106
164

107
-
108
-
165
+
109
166
## General In-Editor Usage
110
-
***
111
167
112
168
### Connecting to source control:
169
+
113
170
Generally speaking, the field next to `Uses Git LFS 2 File Locking workflow` should match your Git server's `User Name`, like so:
114
171
(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)
115
172
116
173

117
174
118
175
### Checking out (locking) one or more assets:
176
+
119
177
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.
120
178
121
179

122
180
123
181
### Unlocking one or more un-changed assets:
182
+
124
183
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.
125
184
126
185

127
186
128
187
### Locking every asset within a folder:
188
+
129
189
You can lock every file in a folder by right clicking on the folder and clicking `Check Out`.
130
190
131
191

132
192
133
193
### Viewing locks:
194
+
134
195
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.
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.
140
202
141
203

142
204
143
205
### Submitting changes up-stream:
206
+
144
207
`Submit to source control` will create a local commit, push it, and release your file lock.
145
208
(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`.)
146
209
@@ -149,27 +212,3 @@ You can pull the latest changes from your currently checked-out branch within th
149
212
## Additional Resources
150
213
151
214
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:
* 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.)
0 commit comments