- Unreal Engine 4 Scripting with C++ Cookbook
- William Sherif Stephen Whittle
- 568字
- 2021-07-08 10:50:45
Project management on GitHub – getting your Source Control
A very important thing to do for your project as you're developing it is to generate a timeline history as you're working. To do so, you need to back up your source code periodically. A great tool for doing so is Git. Git allows you to park changes (commits) into a repository online on a remote server so that your code's development history is documented and preserved on that remote server. If your local copy gets damaged somehow, you can always recover from the online backups. This timeline-history of your codebase's development is called Source Control.
Getting ready
There are a couple of free services that offer online source backups. Some of the free alternatives for storing your data include:
- Visualstudio.com: limited/private sharing of your repository
- github.com: unlimited public sharing of your repositories
Visualstudio.com is great for when you want some privacy for your project for free, while GitHub is great when you want to share your project with lots of users for free. Visualstudio.com also offers some very good workboarding and planning features, which we will use later in this text (GitHub also offers a competing Issue Tracker, which we'll discuss later on as well).
The website you choose depends mostly on how you plan on sharing your code. In this text, we will use GitHub for source code storage, since we need to share our code with a large number of users (you!)
How to do it...
- Sign up for a GitHub account at https://github.com. Sign into your GitHub account using the Team Explorer menu (View | Team Explorer).
- Once you have the Team Explorer open, you can sign into your GitHub account using the button that appears in the Team Explorer window.
- After you've signed in, you should gain the capability to Clone and Create repositories. These options will appear right underneath the GitHub menu in the Team Explorer.
- From here, we want to create our first repository. Hit the Create button, and name your repository in the window that comes up.
Tip
When creating your project, take care to select the VisualStudio option from the
.gitignore
options menu. This will cause Git to ignore the Visual Studio-specific files that you don't want included in your repository, such as the Build and Release directories. - Now you have a repository! The repository is initialized on GitHub. We just have to put some code into it.
- Open up the Epic Games Launcher, and create a project to put into the repository.
- Open the C++ project in Visual Studio 2015, and right-click on Solution. Select Add Solution to Source Control from the context menu that appears. The dialog that appears will ask whether you want to use Git or TFVC.
Tip
If you use Git for your source control, then you can host on either github.com or Visualstudio.com.
- After you add Git Source Control to the project, take a look at Team Explorer again. From that window, you should enter a brief message, then click on the Commit button.
How it works...
Git repositories are important for backing up copies of your code and project files as your project evolves. There are many commands within Git to browse the project history (try the Git GUI tool), see what changes you've made since the last commit (git diff
), or move backward and forward through the Git history (git checkout commit-hash-id
).
- Flask Web全棧開發實戰
- Learning Selenium Testing Tools with Python
- Python語言程序設計
- Access 2010數據庫基礎與應用項目式教程(第3版)
- 重學Java設計模式
- 利用Python進行數據分析(原書第3版)
- 可解釋機器學習:模型、方法與實踐
- 組態軟件技術與應用
- Vue.js 2 Web Development Projects
- Java編程從入門到精通
- jQuery技術內幕:深入解析jQuery架構設計與實現原理
- Training Systems Using Python Statistical Modeling
- Building UIs with Wijmo
- 基于JavaScript的WebGIS開發
- Python程序設計教程