|
Working with GitHub repository [updated: 04/02/2015]
|
|
06-07-2013, 08:33 PM
(This post was last modified: 06-29-2018 01:41 PM by micheus.)
Post: #1
|
|||
|
|||
|
The instructions I'm putting here are for use with "linux like" environment under Windows as MSysGit, MinGW or CygWin. (and for any Linux too)
If you want only to translate Wings3D' language files go here: [Translating Wings3D] Working with GitHub Also, this is not a technical guide (neither detailed) - for that, check these links: ![]() - Git Community Book (user friendly) - Git Documentation (user friendly) - git(1) Manual Page (full list of commands) - Git Internals - Maintenance and Data Recovery Setting up GitHub
This is a sample what I have on my system (you can use these command at any time): $ git remote % this will list all remote repositories added Code: dgud$ git branch % this will list all branches existing on your PC (local) Code: dgud/bugfixesStarting to work... These are the basic operations your will use.
Other useful commands... These are operations that you would need to use.
Added 06/15/2015 - got to link
This small reference was assembled along the time I was starting to contribute with the Wings3D's community. I would to register my thanks to optigon and dgud which helped me a lot by taking out my doubts (even nowadays).
|
|||
|
06-07-2013, 08:50 PM
Post: #2
|
|||
|
|||
|
RE: Working with GitHub repository
Brilliant initiative!! Thanks..
The Universe is an infinite equation |
|||
|
01-02-2014, 12:23 AM
(This post was last modified: 04-22-2016 10:27 PM by micheus.)
Post: #3
|
|||
|
|||
|
[Translating Wings3D] Working with GitHub [updated: 04/23/2016]
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)
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. |
|||
|
01-02-2014, 02:14 AM
Post: #4
|
|||
|
|||
|
RE: [Building Wings3D] Working with GitHub repository [updated 01/01/14]
What is the best way to verify that the local files really are last version of the "ancestor" repo ? Is it with the SHA hash displayed on top the Windows app or just under the "pull resquest" on this page ? They're not even the same !?
Thanks. My websites (in french) : Main • Blog • Shared gallery • 3D Wiki (WIP) |
|||
|
01-02-2014, 04:41 PM
Post: #5
|
|||
|
|||
|
Re: Working with GitHub for Translations
TulipVorlax, I think you can use the show command for that. Take a look at the pictures below and see if they answer your question...
If everything was "fetched" all informations should be updated and we can use git show -s [object] to verify the latest updates. Here is a sequence of actions for exemplify the situation:
|
|||
|
01-03-2014, 09:39 AM
(This post was last modified: 01-03-2014 09:50 AM by TulipVorlax.)
Post: #6
|
|||
|
|||
|
RE: [Building Wings3D] Working with GitHub repository [updated 01/01/14]
Good.
All 3 git show command gave the exact same output, so i created the new branch. Now i wanted to do a test and duplicate the english lang file, but it's not there. I think i remember reading that this file was created while compiling the release or something, so it's normal. But now i'm unsure wich files _en.lang files should i use, i can't translate from any other language, lol. I suppose i just have to use the files from my last installation of Wings. This mean that translation would always be a bit behind, if any string was changed in the source after the last release. Maybe it's not that much of a problem, it's often like this on other opensource projects. EDIT : I found a file in the source that never was on my computer before : mac_file_fr.lang I can't update this file because i don't have the english one and i dont have a mac to test it.
My websites (in french) : Main • Blog • Shared gallery • 3D Wiki (WIP) |
|||
|
01-03-2014, 04:02 PM
(This post was last modified: 06-01-2014 03:54 PM by micheus.)
Post: #7
|
|||
|
|||
RE: [Building Wings3D] Working with GitHub repository [updated 01/01/14]
(01-03-2014 09:39 AM)TulipVorlax Wrote: Now i wanted to do a test and duplicate the english lang file, but it's not there. I think i remember reading that this file was created while compiling the release or something, so it's normal.Yes. It is created when we build the installer or if we run the command "make lang" (for those that have a dev environment). You also can get it from the official version (always the last one) you have installed in you PC. Quote:I found a file in the source that never was on my computer before : mac_file_fr.langI can't generate a English lang file for it. Anyway, this kind of file is used for the file dialogs, so I don't think you need update it. |
|||
|
06-15-2015, 09:02 PM
(This post was last modified: 10-29-2015 04:30 PM by micheus.)
Post: #8
|
||||
|
||||
|
Updated: 06/15/2015
Updating your master branch with the official one
By considering you create different branches for the changes you do, it's a good idea update the master branch when the official one is updated. This way, every new branch you create will be "synchronized" with it: $ git checkout master $ git fetch origin $ git reset --hard origin/master (ensuring your local master is the same your remote/origin) $ git fetch dgud (updating your local references to the master dev) $ git rebase dgud/master ("synchronizing" your local with the official one) $ git push origin master (updating your remote branch master) If you get this kind of error message: Quote: ! [rejected] master -> master (non-fast-forward)you probably will need to use git pull as suggested: $ git pull origin master Quote:From http://github.com/Micheus/wingsAs is all OK now, we can try the last git push command again. That is valid for any local branch. Fixing the last commit you just pushed to origin $ git rebase -i HEAD~1 The editors will start with the last commit reference prefixed by pick and followed by a comment showing the commands you can use: Quote:# Commands:if you want only to change the commit message, replace the pick by reword; if you want make other changes to the code using the same commit then replace it by edit. If you chose reword, after you save and exit the editor it will be started again with the last commit message to be edited. If you chose edit, then you will see something like this: Quote:Stopped at 8e59ce9... Fixed menus issue related to use of [option] flag.Just proceed with our changes to the source code. After we've finished it we need to tell to git which files to update by using git add command. We can check this by using git status command. Then, as suggested in the message above, we can use git commit --amend to update the commit message and after this we use git rebase --continue in order to commit the changes. Now we just make a new forced push to origin and it's done!
|
||||
|
10-29-2015, 05:00 PM
(This post was last modified: 12-14-2018 07:16 AM by micheus.)
Post: #9
|
||||
|
||||
|
[updated: 10/29/2015]
Copying commits from a branch to another
Let say we made some changes and committed them in the wrong branch and we want to move or just copy it to the current branch - we do that using cherry-pick command. The first we need to find the commit ID which we can do by using the log command. A list of commits will be shown: $ git log <source branch> Quote:commit c61c5e42edbc31f49bf3dd373e564dd3742b0d79We need to take note of the only first seven number: c61c5e4 Now, in the current branch, we run the follow command: $ git cherry-pick c61c5e4 Quote:[mv/shaders f2af162] Fixed .auv file parser for menu option controlDone! Copying only a file from a commit to another branch $ git checkout <commit> <folder or file path in the current branch> Retoring a file from a branch $ git checkout <branch> <file path in the current branch>
|
||||
|
10-29-2015, 07:07 PM
Post: #10
|
|||
|
|||
|
RE: Working with GitHub repository [updated: 04/02/2015]
Why do you not use gitk?
It is very easy to point and rightclick/cherry-pick the commits you want. |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)








@MicheusVieira
MicheusVieira
Micheuss
micheus4wings3d