[HOWTO] Push to git with the WebInterface

User avatar
IAHM-COL
Posts: 6409
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

[HOWTO] Push to git with the WebInterface

Postby IAHM-COL » Sun May 22, 2016 4:23 pm

Hi All,

This little tutorial shows github capabilities to push new files to an aircraft without the need of using a git tool. Somewhat convenient to push a new file from a computer that does not have the git tools ready, or for those for which Git is still very foreign concept.
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6409
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: [HOWTO] Push to git with the WebInterface

Postby IAHM-COL » Sun May 22, 2016 4:28 pm

STEP 1: Fork. Make your life Safe!

Forking allows you to create a new repository that you own, and this repository is a safe heaven for risk and exploration. If you royally mess-up, there is no problem to delete the fork, and start again.

When you are done succesfully modifying a fork, you use a Pull request to bring the changes into FGMEMBERS, so everyone (every smart-one), benefits.

To fork, you need to be log-in github, and look for the repository you intend to fork, then pressing the button "fork" once.
Image


This creates a new repository in your own account, which is a clone (identical copy) of the original one
Image

(here FGDATA made 1 fork of EMB-120)
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6409
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: [HOWTO] Push to git with the WebInterface

Postby IAHM-COL » Sun May 22, 2016 4:46 pm

Step 2: Add New files to your forked repo

Github now provides the opportunity to add new files to a repo via the web-browser. (instead of adding/pushing via git)

In this example, we will be adding the New Presidential Uruguay's Livery to the Aircraft, made available by Lesbof, for the USATour 47

viewtopic.php?f=8&p=9426#p9422

To do this, we will go, on github, to the folder of interest, in the source browser

https://github.com/FGDATA/EMB-120/tree/master/Models

Code: Select all

Models/


And there, we will use the button "upload files"

Image

You can either drag/drop in there, or use "choose files" to open your browse explorer to select the files to add (in this path)

Code: Select all

Uruguay_fuse.png
Uruguay_wings.png

(I skipped Uraguay.jpg since i. it's unnecessary, and ii. it's a copyrighted image, and thus GPL incompatible)
Image

I could actually use the little x on the right, to unload a file.

Now, You will commit the changes pertinent to this folder.
Since you are working on your own fork, you can do so directly to master.brach

Note: Add a commit name, and a description, that is sensible to the changes being done.

Image


And press, commit changes to finally add.

This succesfully commits these files into your fork

Image
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6409
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: [HOWTO] Push to git with the WebInterface

Postby IAHM-COL » Sun May 22, 2016 4:52 pm

Step 3: Repeat Step 2 for every folder needed.

Yes. It is a fault of the browser commiting, you need to work commiting folder by folder

I will add the needed file

Code: Select all

Models/Liveries/Uruguay.xml


and commit.

Then, add the file

Code: Select all

thumbnail.jpg

and commit. This should replace the old thubmnail.

after this, the fork has three new commits, and the livery is now properly installed

Image

And

Image
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6409
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: [HOWTO] Push to git with the WebInterface

Postby IAHM-COL » Sun May 22, 2016 4:58 pm

Step 4. Pull Request to FGMEMBERS to share the changes globally

Finally, all it is needed is the pull request.
Use the New Pull Request button

Image

Then, create pull request,

Image

Then, fill the fields with information that is pertinent to understand the changes, and create the pull request

Image.

After this, the pull request is completed, and anyone with FGMEMBERS access can review, and merge subsequently (by pressing the Merge Request green button)

A comment and discusion thread is created so developers can share opinions, suggestions, recommendations, etc.
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6409
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: [HOWTO] Push to git with the WebInterface

Postby IAHM-COL » Sun May 22, 2016 5:04 pm

Merging and getting the changes back into FGMEMBERS

Once the changes are reviewed, and all looks good, then one can press the confirm merge button.
This will update FGMEMBERS repository

Image

Notifications are made. Everyone observing the original repo will receive a notification email, and a purple revert button will be created: This is the "regret" button.

FGMEMBERs repo history and last commit now show that the changes took effect

Image

https://github.com/FGMEMBERS/EMB-120/commits/master
Image

and users can download again (or git pull) to get their aircraft consequently updated.

And, that's all! :D
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?


Return to “FGMEMBERS”

Who is online

Users browsing this forum: Google [Bot] and 7 guests