Some GitHub related questions

Post Reply
dicene
Posts: 47
Joined: Thu Sep 25, 2014 7:36 am

Some GitHub related questions

Post by dicene » Sat Nov 05, 2016 7:44 am

So I've finally decided to start making contributions beyond forum posts, which means I'm finally going to start using GitHub and trying to put things into pull requests. Got a few (probably) simple questions.

My first thing will be adding in getMousePosition(). It involves a very small amount of changes to TLuaInterpreter.cpp and TLuaInterpreter.h. I've cloned the Mudlet/Mudlet repo via the GitHub Desktop program for Windows, and I modified the two appropriate files. Two initial questions came up:

1.) I'm modifying the source in the Mudlet clone on my computer. When I go to test this change to make sure it's working, should I be compiling it in the cloned Mudlet folder that the GitHub program is watching, or should I be copying the whole src folder to compile and test it elsewhere to avoid having to worry about the created object files and files that require being copied into the release folder(necessary dll's) trying to jump into my commit?

2.) Should my changes be done to a clone of the development branch, should I be doing them to a custom-named branch, or should I be breaking my changes down into a separate branch each(one for getMousePosition, one for a OnReleaseCallback for labels, etc) so they can be PR'd/discussed/pushed separate from each other?

User avatar
Vadi
Posts: 4674
Joined: Sat Mar 14, 2009 3:13 pm

Re: Some GitHub related questions

Post by Vadi » Mon Nov 07, 2016 1:29 am

Hey, thanks for diving into this.

1) compile it directly in the cloned Mudlet folder that the Git app is watching. Don't worry about dlls getting into a commit - you can have global or per-project .gitignore files which specify files to be ignored, and Mudlets already ignores the whole /build folder. You should not see any new files pop up on git diff after compiling.

2) Yes, the latter, exactly for reasons you mentioned.

Let us know if you've got any other questions!

User avatar
SlySven
Posts: 919
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Some GitHub related questions

Post by SlySven » Mon Nov 07, 2016 1:47 am

You may find gitk --all (interactive tree history browser) and git gui useful GUI tools - the former helps with branch management and the latter with assembling the changes you want (particularly with contents of text-based source files) into commits that you can also "sign-off" (if you have configured your Username and EMail into git) and "push" to remote servers (after selecting which local branches you want to push out to update remote branches). You will also want to use git fetch --all to pull in changes to the remotes that you have not caused yourself - which can be done without affecting your current local Work In Progress if you become aware that someone else has had changes merged into the tree.

dicene
Posts: 47
Joined: Thu Sep 25, 2014 7:36 am

Re: Some GitHub related questions

Post by dicene » Tue Nov 08, 2016 10:29 am

After messing around in GitHub and the desktop app a little, I think I've got the gist of the basic part of it. Got all the compiled files being ignored by an updated ignore file that I've got set NOT to be commited. Used the Fork option on the website, then made a new branch named after the change I was working on, then updated the appropriate files, compiled and tested to be sure it was working right, and commited the changes to my branch. Then, I submitted a pull request to bring the commit to the main development branch at Mudlet/Mudlet.

Besides missing documentation(updated manual), I think I'm not forgetting anything?

User avatar
Vadi
Posts: 4674
Joined: Sat Mar 14, 2009 3:13 pm

Re: Some GitHub related questions

Post by Vadi » Tue Nov 08, 2016 7:10 pm

Yep, think you did the process right.

User avatar
SlySven
Posts: 919
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Some GitHub related questions

Post by SlySven » Wed Nov 09, 2016 3:40 pm

dicene wrote:...Besides missing documentation(updated manual), I think I'm not forgetting anything?
Many coders miss out on documentation - and at times you can really find yourself wishing there was documentation...! :-)

BTW gist is actually a meaningful term on GitHub - they use it to mean a slightly separate code snippet/testing/sample system they also operate as I understand it... :geek:

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests