Differences between revisions 16 and 17
Revision 16 as of 2015-02-25 09:42:44
Size: 4131
Comment:
Revision 17 as of 2015-02-25 09:51:55
Size: 4257
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
The first thing you should do is create a [[https://help.github.com/articles/signing-up-for-a-new-github-account/|a free Github account]] and fork Robin's [[https://github.com/wxWidgets/Phoenix|repo]] (see top right of screen), see also [[https://help.github.com/articles/fork-a-repo/|Fork a repo]]. Then to get this code to your local PC you need to clone the fork you did, see also [[http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository|Git basics]]. The first thing you should do is create a [[https://help.github.com/articles/signing-up-for-a-new-github-account/|a free Github account]] and fork wxWidgets [[https://github.com/wxWidgets/Phoenix|Phoenix repository]] (see top right of screen), see also [[https://help.github.com/articles/fork-a-repo/|Fork a repo]]. Then to get this code to your local PC you need to clone the fork you did, see also [[http://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository|Git basics]].
Line 10: Line 10:
Following are the steps using the ''git cli'' and assumes you have ssh setup. I personally do this all in the UI client I use, until today that was TortoiseGit but Robin just mentioned [[http://www.sourcetreeapp.com/|SourceTree]], which I have to say is much nicer and handles both git and hg repositories. Following are the steps using the ''git cli'' and assumes you have ssh setup. I personally do this all in the UI client I use, until today that was [[https://code.google.com/p/tortoisegit/|Tortoise for GIT]] but Robin just mentioned [[http://www.sourcetreeapp.com/|SourceTree]], which I have to say is much nicer and handles both git and hg repositories.
Line 26: Line 26:
Your fork is normally referred to as 'origin' and Robin's master is normally referred to as 'upstream'. Your fork is normally referred to as 'origin' and wxWidgets repository is normally referred to as 'upstream'.
Line 28: Line 28:
You need to add Robin's repo as upstream. You need to add the wxWidgets repo as upstream.
Line 51: Line 51:
Until today I used TortoiseGit and TortoiseHG, but had to check out Robin's favoured and find [[http://www.sourcetreeapp.com/|SourceTree]] very nice and it does handle both Github and Bitbucket repo's in one UI - neat:). Until today I used [[https://code.google.com/p/tortoisegit/|Tortoise for GIT]] and `TortoiseHG`, but had to check out Robin's favoured and find [[http://www.sourcetreeapp.com/|SourceTree]] very nice and it does handle both Github and Bitbucket repo's in one UI - neat:).

How to contribute using GIT

The wxPython code is stored in a Github repository and the preferred way of providing changes is via PR's (Pull Requests), the following page will provide some pointers on how to work with git and Github.

The first thing you should do is create a a free Github account and fork wxWidgets Phoenix repository (see top right of screen), see also Fork a repo. Then to get this code to your local PC you need to clone the fork you did, see also Git basics.

Create a pull request

A PR can be a simple one line change or a new widget or anything in between this. A pull request can be commented on and often the comment will mean changes to a PR before it will be merged, therefore it is strongly suggested to create a branch in your clone of the repo for each PR.

Following are the steps using the git cli and assumes you have ssh setup. I personally do this all in the UI client I use, until today that was Tortoise for GIT but Robin just mentioned SourceTree, which I have to say is much nicer and handles both git and hg repositories.

  1. cd yourphoenixclonedir

  2. git checkout master - switch to the master branch, if you just cloned your are already in it

  3. git status - allows you to check on which branch you are

  4. git checkout -b yourbranchname - create 'yourbranchname' and check it out, sometimes called switch to it

  5. make changes and git commit -a -m 'add your first change' - do this frequently

  6. git push

  7. create the PR on your github account from 'yourgitaccount:yourbranchname' to 'wxWidgets:master'
  8. getting comments to the PR
  9. make changes and commit frequently
  10. git push the PR will be updated automatically

Resync your fork with Robin's master

After Robin has merged your change or done other changes to the master branch you need to get this into your fork.

Your fork is normally referred to as 'origin' and wxWidgets repository is normally referred to as 'upstream'.

You need to add the wxWidgets repo as upstream.

  • - git remote add upstream git@github.com:wxWidgets/Phoenix.git

Get the changes from upstream and push them to your fork.

  1. git fetch upstream

  2. git checkout master

  3. git rebase upstream/master

  4. git push

Start with GIT

Git immersion tutorial This looks pretty comprehensive, just replace 'Ruby' with 'Python':)

Fork a repo This is what gave Robin the "Ah ha!" moment when trying to grok github.

git cheat sheet

Graphical tools for GIT

Until today I used Tortoise for GIT and TortoiseHG, but had to check out Robin's favoured and find SourceTree very nice and it does handle both Github and Bitbucket repo's in one UI - neat:).

On Windows

SourceTree What Robin uses when he isn't using Git from the CLI.

Git for Windows

Tortoise for GIT - a graphical UI

On MAC

SourceTree What Robin uses when he isn't using Git from the CLI.

Git

GitX - a graphical UI

On Linux

"$@#!@! There's no SourceTree for Linux!" -- Robin

SmartGitHG Not as smooth as SourceTree, but it is what Robin uses when he just can't figure out the CLI. Ironically, a NOT FREE tool that he only uses on a FREE operating system.

ContributeWithGIT (last edited 2015-04-08 23:28:11 by MoonKid)

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.