-
Notifications
You must be signed in to change notification settings - Fork 10
Note to developpers
Want to learn Lua ? Have a look here : http://rubenwardy.com/minetest_modding_book/index.html
Recently many changes have been made in the repository. New methods have been adopted for pushing/pulling from the repository. You will find here the most importants
After committing, you will need to reproduce your changes on parallel branches.
For example, if you commit on master :
> git format-patch HEAD~<amount of commits to reproduce> --stdout > patch_for_branch.patch
> # Created a .patch file to apply commits on the other branch
> git checkout <parallel branch>
> git am ./patch_for_branch.patch # Apply the patch
> git push origin <parallel branch>
If you want to see which files are being modified, or how many lines are added :
> git apply --stat < patch_for_branch.patch
another_file.txt | 0
another_file.txt | 0
2 files changed, 0 insertions(+), 0 deletions(-)
>
If you want to check whether or not you will have to resolve merge conflicts :
> git apply --check < patch_for_branch.patch
If you get errors, then git am will require you to solve merge conflicts.
WIP works are often put on parallel branch to not disturb simple updates or fixes for mods (even if they should be reproduced on these branches as shown above). However, there might be problems, requiring devs to 'forcepush' on the branches.
Note: It will never happen on master
If you cannot pull, then, here is what to do :
> git checkout master
> git branch -D <parallel branch>
> git checkout -b <parallel branch>
> git branch --set-upstream-to=origin/<parallel branch>
> git pull origin <parallel branch>
This will delete your copy of the branch, create a new one, and replace it with the remote content.
You can also :
> git pull --force
CC-BY-SC-SA @ MinetestForFun