![]() It is customary to only put stable versions of the project in the master branch. Merging creates a new commit in the target branch. A branch is always merged into another branch (called the target), so only one ends up having all the changes in it. ![]() For example, it is advised to create a new branch when you want to test something that might break the project but can't be done in a single commit. You can also have multiple branches made for different purposes. The data structure that stores each commit it is often used as a substitute for the folder which holds the project.Ī separate chain of commits think of it as making your own version of the project, while others make their own ones. You push in order to update the project on the repository. "Upload" your local commits to the online repository. You pull in order to update the project on your end. "Download" commits from the branch in the repository. It is also often used as a way of saying "check out an older commit (before smth was broken) and work from there". This basically means "uncommiting" changes. On the graph below, individual dots are commits.Ĭhanging the current commit is called like this, i.e. ![]() Its purpose is to allow to revert unwanted changes and any accidents. The master branch is blue, and the side branch is green. Git branches are useful to separate your version from the main project version, and later be merged when your work is done. However, for the reason stated above, it can be safer to have an online one. If you're working on a mod by yourself, you probably don't need to put your repository online. An online repo lets you get back all your work within minutes, if something like that happens. If you permanently delete your project folder, the repo (which is stored inside the project folder) will be gone along with it. It also allows team members to check out the versions of the project that other members are working on.Īnother important benefit is having an off-site back-up of your project. The biggest benefit of an online repo is the ability to easily combine changes made by all members of a mod team into a single "current" copy. It can be stored locally (the repo is essentially a hidden folder in your project folder), but it can also be uploaded online. Creating a repository ("repo" for short) basically means that you start to monitor changes in a project. gets accidentally deleted, this change can be discarded and the file is restored (this is a much simpler and way faster process than restoring a regular back-up).Ī repository is what records all the changes in a project. Loading a commit also loads all of the previous ones, so the project is always preserved in its entirety.Ĭhanges to each file have to be added to a commit before one is created, so if something e.g. Because only the changes are recorded, this process if very quick. A version control system basically gives you the ability to quickly create a back-up of your changes with a few clicks (this is called a "commit"). ![]() Version control is the process of maintaing a history of project versions which can be compared and reverted to, if anything goes wrong.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |