UE4玩具项目存到Github

Github创建仓库并克隆到本地

创建仓库

这个就不写了

仓库clone到本地

  • 默认本地安装有git,没有的话就自己安装一下
  • 在想要存放本地文件的目录右键->Git Bash Here
  • 键入 git clone https://github.com/xxx/xxx.git 将仓库克隆到本地 (注意路径从Github自己的仓库去复制下)
    image

创建/迁移UE项目工程

将项目工程目录移到本地仓库(已有工程)

  • 就简单的文件拷贝而已,(但是如果你项目中有写死路径,那么要注意更正!)
  • 如果还没有创建工程,那么直接将工程创建在本地仓库目录下即可

添加gitignore文件

  • 在项目根目录下新建文件.gitignore(过滤掉编译所得的二进制文件、中间文件、ddc以及IDE生成的无用文件等)
    image
  • 规则可以直接复制,额外需要的自己再加
.gitignore规则(我也是从其他博客复制的,做了小小修改)
# Visual Studio user specific files
.vs/
.idea/

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
*.ipa

# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb

# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga

# Binary Files
Binaries/*
Plugins/*/Binaries/*

# Builds
Build/*

# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt

# Don't ignore icon files in Build
!Build/**/*.ico

# Built data for maps
*_BuiltData.uasset

# Configuration files generated by the Editor
Saved/*

# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*

# Cache files for the editor to use
DerivedDataCache/*

使用git管理项目

  • git的教程和工具都非常多了,自行学习~

参考内容

https://www.its203.com/article/weixin_33232568/97757384

posted @ 2022-02-19 19:56  yocichen  阅读(255)  评论(0编辑  收藏  举报