https://github.com/hxhb/gitcontrollerue
https://github.com/hxhb/gitcontrollerue
git unreal-engine
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hxhb/gitcontrollerue
- Owner: hxhb
- Created: 2019-11-28T01:29:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-18T09:13:17.000Z (over 3 years ago)
- Last Synced: 2025-04-16T08:10:31.288Z (11 days ago)
- Topics: git, unreal-engine
- Language: C++
- Homepage:
- Size: 30.3 KB
- Stars: 10
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## What is this?
This is an Unreal Engine 4 Plugin that you can operator Git Repository. Support C++ and Blueprint.

## How do use?
Wrapper Interface:
```cpp
UCLASS()
class GITSOURCECONTROLEX_API UFlibSourceControlHelper : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, BlueprintPure, Category = "GitSourceControlEx|Flib")
static FString GetGitBinary();UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
static bool RunGitCommandWithFiles(const FString& InCommand, const FString& InPathToGitBinary, const FString& InRepositoryRoot, const TArray& InParameters, const TArray& InFiles, TArray& OutResults, TArray& OutErrorMessages);
UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
static bool RunGitCommand(const FString& InCommand, const FString& InPathToGitBinary, const FString& InRepositoryRoot, const TArray& InParameters, TArray& OutResults, TArray& OutErrorMessages);UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
static bool DiffVersion(const FString& InGitBinaey, const FString& InRepoRoot, const FString& InBeginCommitHash, const FString& InEndCommitHash, TArray& OutResault, TArray& OutErrorMessages);
UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
static bool GitLog(const FString& InGitBinaey, const FString& InRepoRoot, TArray& OutCommitInfo);UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
static bool GetBranchName(const FString& InPathToGitBinary, const FString& InRepositoryRoot, FString& OutBranchName);
UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
static bool GetRemoteUrl(const FString& InPathToGitBinary, const FString& InRepositoryRoot, FString& OutRemoteUrl);/**
* Run a Git "log" command and parse it.
*
* @param InPathToGitBinary The path to the Git binary
* @param InRepositoryRoot The Git repository from where to run the command - usually the Game directory
* @param InFile The file to be operated on
* @param bMergeConflict In case of a merge conflict, we also need to get the tip of the "remote branch" (MERGE_HEAD) before the log of the "current branch" (HEAD)
* @param OutErrorMessages Any errors (from StdErr) as an array per-line
* @param OutHistory The history of the file
* @param InHistoryDepth return history depth default is MAX_Int32
*/
UFUNCTION(BlueprintCallable,Category="GitSourceControlEx|Flib")
static bool RunGetHistory(const FString& InPathToGitBinary, const FString& InRepositoryRoot, const FString& InFile, bool bMergeConflict, TArray& OutErrorMessages, TArray& OutHistory,int32 InHistoryDepth);UFUNCTION(BlueprintCallable, Category = "GitSourceControlEx|Flib")
static bool GetFileLastCommit(const FString& InPathToGitBinary, const FString& InRepositoryRoot, const FString& InFile, bool bMergeConflict, TArray& OutErrorMessages, FGitSourceControlRevisionData& OutHistory);};
```