• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Programming v
1 2 3 4 Next »
Working with GitHub repository [updated: 04/02/2015]

 
  • 0 Vote(s) - 0 Average
Working with GitHub repository [updated: 04/02/2015]

micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,682
Threads: 185
Joined: Jun 2012
#3
01-02-2014, 12:23 AM (This post was last modified: 04-22-2016, 10:27 PM by micheus.)
I tried to create a script for those users who wants help us with the translations of language files - so, they need only a github account, environment and set their personal informations for it.

It is just for translators who doesn't need preserve their branches, since we wont use rebase (we are always overwriting the master branch).

Preparing the environment (just for the first time - steps 1 to 4)
  1. Download and install Git for Windows from this link.

  2. Let say the path name and location is "c:\git". Use the windows explorer and look for the file "git-bash.exe" into that folder and run it.

  3. In the prompt ($), lets clone the remote wings repository to the local one and enter in the wings directory:
    $ git clone http://github.com/<your github repository>/wings.git wings
    $ cd wings

    this action is going to create a folder wings under the current directory (c:\git\wings) with all source files.

  4. Git records your name and email address with every commit you make, so the first step is to tell Git what these are:
    $ git config user.name 'Your Name'
    $ git config user.email you@domain.com


    obs: you can check these informations by running the command: $ git config -l

    From this point the procedures will be the same for every time you need to update the sources in order to get any new/updated language file from the master programmer.

  5. Being sure to have selected the master branch to work
    $ git checkout master

  6. Updating the local references to your wings repository on github
    $ git fetch origin

  7. Making sure the local files are the last one made available by the master programmer (dgud):
    $ git reset --hard dgud/master
  8. Updating your remote master branch with that one we just "download" to the local repository:
    $ git push origin master

  9. Creating a new branch for each new version of Wings
    $ git checkout -b v1.5.2
    For example, this will create a new branch named v1.5.2 based on the master branch.

    Now you can work in the languages files which you would find in the .\wings\src, .\wings\plugins_src and its subdirs.
    You must use the original files (English)as reference and naming the new .lang files like shown in this post.

    You can check the files currently changed by using the command:
    $ git status

    here a sample of the output information. It shows a modified file and a new one:
    Quote:$ git status
    On branch master
    Your branch is ahead of 'origin/master' by 8 commits.
    (use "git push" to publish your local commits)

    Changes not staged for commit:
    (use "git add <file>..." to update what will be committed)
    (use "git checkout -- <file>..." to discard changes in working directory)

    modified: src/wings_pt.lang

    Untracked files:
    (use "git add <file>..." to include in what will be committed)

    src/wings_es.lang

    no changes added to commit (use "git add" and/or "git commit -a")
    In order to enable files in the branch be updated by a commit command you will need to add the files for commit as informed in the output screen (just the first time it is reported as "not staged for commit" or "untracked").
A new .lang file will appear in the Untracked files session and as indicated you should to use git add <file_name> in order to include it to your branch.

In order to write the commit messages required by that git command we may need to install an editor like Vim or Emacs and add their paths to the PATH variable (for the git console/shell).
After run the git commit command the editor it will opened and you can describe the informations you think is necessary about what you did. (a list of Vin's commands can be found here and for Emacs here).

After all your files has been updated/added and committed is time to push it to your remote repository:
$ git push origin master
that command will replace your remote (origin) master branch with the local one.

The next step is to make a Pull Request at GitHub to the main developer's repository.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Messages In This Thread
Working with GitHub repository [updated: 04/02/2015] - by micheus - 06-07-2013, 08:33 PM
RE: Working with GitHub repository - by povmaniac - 06-07-2013, 08:50 PM
[Translating Wings3D] Working with GitHub [updated: 04/23/2016] - by micheus - 01-02-2014, 12:23 AM
RE: [Building Wings3D] Working with GitHub repository [updated 01/01/14] - by TulipVorlax - 01-02-2014, 02:14 AM
Re: Working with GitHub for Translations - by micheus - 01-02-2014, 04:41 PM
RE: [Building Wings3D] Working with GitHub repository [updated 01/01/14] - by TulipVorlax - 01-03-2014, 09:39 AM
RE: [Building Wings3D] Working with GitHub repository [updated 01/01/14] - by micheus - 01-03-2014, 04:02 PM
Updated: 06/15/2015 - by micheus - 06-15-2015, 09:02 PM
[updated: 10/29/2015] - by micheus - 10-29-2015, 05:00 PM
RE: Working with GitHub repository [updated: 04/02/2015] - by dgud - 10-29-2015, 07:07 PM
RE: Working with GitHub repository [updated: 04/02/2015] - by micheus - 10-29-2015, 07:14 PM
RE: Working with GitHub repository [updated: 04/02/2015] - by dgud - 10-30-2015, 01:41 PM
Using Dialyzer - by micheus - 04-17-2019, 01:37 PM

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode