Page 1 of 1

News! (HOW DO YOU USE GIT)

PostPosted: Sat Oct 29, 2016 20:16
by KittyCakes
I have GitHub now!!!!!!!!!!!!!! So I don't really know how to use it. I really wanna know how to make a mod with it. So please tell me about GitHub. My username on it is CandyKitty.

Re: News! (HOW DO YOU USE GIT)

PostPosted: Sat Oct 29, 2016 20:19
by Wuzzy
Well, I suggest you first read through the help pages of GitHub. Here's a starting point:
https://help.github.com/articles/set-up ... atform-all

Re: News! (HOW DO YOU USE GIT)

PostPosted: Sun Oct 30, 2016 09:24
by srifqi
KittyCakes wrote:I have GitHub now!!!!!!!!!!!!!! So I don't really know how to use it. I really wanna know how to make a mod with it. So please tell me about GitHub. My username on it is CandyKitty.

GitHub is a place to share and collaborate your work (i.e. mod)

In order to make a mod, you have to learn the basic knowledge of Minetest Modding, or by watching the code from other simple mods.

Good luck!

Re: News! (HOW DO YOU USE GIT)

PostPosted: Sun Oct 30, 2016 23:48
by taikedz
Congratulations - hopefully you will find your joy in modding for Minetest :-)

srifqi's link is very relevant; I find myself going to the methods page a lot: http://dev.minetest.net/Category:Methods

Dunno if the MT forums are normally an appropriate place for asking about github questions specifically... maybe you might find some place for discussion on this topic in the Offtopic forum? I'll keep an eye out for you if so.

Re: News! (HOW DO YOU USE GIT)

PostPosted: Mon Oct 31, 2016 07:38
by paramat
In the Github help section there's a 'Bootcamp' that guides you clearly through all the steps, it's how i learnt.

Re: News! (HOW DO YOU USE GIT)

PostPosted: Mon Oct 31, 2016 10:06
by taikedz
Referencing paramat's response:

https://help.github.com/categories/bootcamp/

I'd recommend the git book manual's basics pages too https://git-scm.com/book/en/v1/Git-Basics

There's a "Chapter" menu in small letters above the text area. The areas you are likely interested in are chapters 2 and 3 to start off with.

Re: News! (HOW DO YOU USE GIT)

PostPosted: Mon Oct 31, 2016 16:58
by taikedz

Re: News! (HOW DO YOU USE GIT)

PostPosted: Tue Nov 01, 2016 19:10
by Milan*
Your base commands are:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
git clone https://cloneurl
git add my/file.lua
git commit -m "added my awesome changes"
git push
# typo but not yet pushed?
git commit --amend
# temporally revert changes
git stash
# show stashed changes
git show stash
# apply stashed changes
git stash apply
# get a commit from the original mod you forked or from another fork
git fetch https://origin/url
git cherry-pick 21a3123s1212d313f # (the hash of the commit)
# bring forked mod with less changes simply up to date (this method also works with other forks, thats why i note it this way
git pull https://wanted/repo
# reset your mod completly, even commits
git reset --hard HEAD
# reset your mod to a specific upstream commit
git reset (hard?) 21a3123s1212d313f # (the hash of the commit)


Edit: better formatted cheat cheet just created here

Re: News! (HOW DO YOU USE GIT)

PostPosted: Tue Nov 01, 2016 20:14
by rubenwardy
The best way to learn how to mod is through this book: http://rubenwardy.com/minetest_modding_book/