Github Tutorials - golden-coconut-studio/TikiAdventuresWiki GitHub Wiki
Getting started with SourceTree
Download and install SourceTree
SourceTree can be found at http://www.sourcetreeapp.com/.
During installation:
- Enter your full name and email address
- Choose the option to install the self-contained Git version to be used by when prompted
- Skip the Mercurial option
- Choose Putty as SSH option
- Enter your github.com username and password
1.Clone Repository
A clone is a copy of a repository that lives on your computer instead of on a website's server somewhere, or the act of making that copy.
To cloning the repository you must have the GitHub path. You can find on the repository main page on the green button.
Then on Source tree find clone button and put the repository link and the folder you want to download the project.
2.Create Branches
A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary develop or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the develop branch to publish your changes.
To create a new branch on Sourcetree, make sure you have select it , the selected branch will be on Bold, then tap on branch button and put a name of the branch, Please: Try to put a feature name branch or very descriptive name.
3.Check your changes
Every time you make new changes on your project, Sourcetree will show you those changes on Working copy tab, before commit your changes, you must have to stage those changes. Tab on Stage Selected or Stage All in case you want to commit all changes, in case you don't want to commit one of them, you have to right click and select Discard
Video step by step checking your changes: https://liveutad-my.sharepoint.com/personal/inaki_haba_live_u-tad_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos%2F3%2EVerCambiosHacerCommitYPush%2Emp4&parent=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos
4.Discard
In case you modify a file by mistake or you was testing something and don't want to commit that change, you can discard them, to do that, on Working Copy, select the changes and right clic and select discard.
5. Commit
A commit, or "revision", is an individual change to a file (or set of files). It's like when you save a file, except with Git, every time you save it creates a unique ID (a.k.a. the "SHA" or "hash") that allows you to keep record of what changes were made when and by who. Commits usually contain a commit message which is a brief description of what changes were made.
Before do a commit a change we must to Stage our new changes (Look at 3.Check your changes), make sure to put a descriptive message
Video step by step doing a commit (Min 1:20): https://liveutad-my.sharepoint.com/personal/inaki_haba_live_u-tad_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos%2F3%2EVerCambiosHacerCommitYPush%2Emp4&parent=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos
6. Push & Pull
Pushing refers to sending your committed changes to a remote repository, such as a repository hosted on GitHub. For instance, if you change something locally, you'd want to then push those changes so that others may access them.
Pull refers to when you are fetching in changes and merging them. For instance, if someone has edited the remote file you're both working on, you'll want to pull in those changes to your local copy so that it's up to date.
After commit your change, you will able to push to remote repository.
In case your branch ( probably develop branch) it's outdated, we need to make a "pull", in order to do that we just simply press on the Pull button, to download last changes.
Note Keep develop UPDATED!
Video step by step doing a push (Min 1:30): https://liveutad-my.sharepoint.com/personal/inaki_haba_live_u-tad_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos%2F3%2EVerCambiosHacerCommitYPush%2Emp4&parent=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos
7. Changing between branches
In case you want to change another branch for example develop, you only have to double click on that branch. This will help you to pull the last change on develop or create a new branch from develop.
Video step by step changing between branch : https://liveutad-my.sharepoint.com/personal/inaki_haba_live_u-tad_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos%2F5%2ECambiarDeRamaYVolverACrearOtraAPartirDevelop%2Emp4&parent=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos
8. Fetch
Fetching refers to getting the latest changes from an online repository without merging them in. Once these changes are fetched you can compare them to your local branches (the code residing on your local machine).
9. Delete a local branch
In case you want to delete a local branch (because you finished work on that branch etc.), you have to right click on that branch and select Delete the_branch_name, if you got an error after deleting the branch try to check Force Delete on the message.
Note you cannot delete the current branch you are working on, you must to switch to another branch in order to delete it.
9. Resolving merge conflict
Merging takes the changes from one branch, and applies them into another.
If you want to resolve conflict from master or develop branch, on Sourcetree right click the branch you want merge it, and then select merge develop into my current branch, if someone on the team has making changes in the same file you are working on, you will get a conflict.
The conflicts file will be marked as a warning icon, in Sourcetree there is an easy way to solve conflicts on UFBP files (Unreal fucking blueprints), right-click the conflict file and find Resolve conflicts then you will have to choose between Resolve using mine or Resolve using their, its mean, you will choose between the change are yours or the change is coming on develop branch. Always try to choose the change on develop and then add it manually (this sucks! but we make sure not remove the team changes).
Note Try to backup your blueprints on http://blueprintue.com
Resolve conflicts step 1 making a backup on blueprintue.com : https://liveutad-my.sharepoint.com/personal/inaki_haba_live_u-tad_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos%2F12%2EResolviendoConflictos%5F1%5FHaciendoBackoupconBluprintue%2Emp4&parent=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos
Resolve conflicts step 2 copying the backup from blueprintue.com : https://liveutad-my.sharepoint.com/personal/inaki_haba_live_u-tad_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos%2F13%2EResolviendoConflictos%5F2%5FCopiandoElBackUpAlBP%2Emp4&parent=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos
Resolve conflicts step 3 Using Unreal source control : https://liveutad-my.sharepoint.com/personal/inaki_haba_live_u-tad_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos%2F14%2EResolviendoConflictos%5F3%5FUsandoSourceControlParaResolverConflictosYCrearUnBPBackupParaElMerge%2Emp4&parent=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos
Resolve conflicts step 4 Resolve conflict from develop : https://liveutad-my.sharepoint.com/personal/inaki_haba_live_u-tad_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos%2F15%2EResolviendoConflictos%5F4%5FResolviendoConflictosConRespectoADevelop%2Emp4&parent=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos
**Resolve conflicts step 4 Diff blueprint (compare using Unreal source control) :**https://liveutad-my.sharepoint.com/personal/inaki_haba_live_u-tad_com/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos%2F16%2EResolviendoConflictos%5F4%5FHaciendoElDiffYTerminandoDeMergear%2Emp4&parent=%2Fpersonal%2Finaki%5Fhaba%5Flive%5Fu%2Dtad%5Fcom%2FDocuments%2FGolden%20Coconut%20Studios%2FGithubTutorialVideos