Yii moved to GitHub

This article may help, to get a better understanding of how git works behind the scenes:


Great article! Added it to the wiki page.

I’d suggest dropping the SVN repo entirely, as Github already provides SVN-read support, and committers should ideally migrate to using Git for new submissions. It doesn’t seem there should be any need to fragment the community between Google Code and Github.

Just my opinion of course :slight_smile:

@CeBe: Can you check on my master branch again? I think I’m in sync with upstream now.

Your branch is not realy "in sync" it is only merged into somehow. Since you once have broken you master branch by committing changes that you did yourself (seems to be some kind of rebase) you cannot use your master branch anymore. Even if the files are the same and the commits look the same they have a differen hash because they depend on other commits than the ones in the yii original repo. the commit hash is generated by the whole content of a commit and though is unique. If you have the same commit hash you really have the same commit with same changes, same author, same parent commit etc…

The problem is that once you have pushed to github you are not able to revert/change history of a branch anymore, github does not allow that (for good reasons btw).

One thing you can do is set up a new branch, call it master2 or something like that and use it instead of master.

But you do not need to do that you can simply start new branches for pull requests with the following commands:

(I asume that your own fork is the ‘origin’ remote and the yiisoft/yii repo is the ‘upstream’ remote like it’s in the github tutorial on forking)

git fetch upstream

git checkout upstream/master

git checkout -b name-of-your-new-branch

If you want to setup your master2, do the same with branch name master2.

Everything clear? Ask if there are questions :)

Oh snap, I really thought I got it right now. Very well, I’ll set up a new master branch then. To all others new to git: Do not fall for the same mistakes I did. Don’t trust treacherous GUIs, just fall back to the console and spare yourself from a lot of trouble (and broken keyboards).

Gotta love Git.:lol:

Quite simply the most unforgiving VCS there is.

Good thing is that there is tons of good docs.

very good!

Hmmm… can’t believe there where a bug like this on GitHub - https://github.com/rails/rails/commit/b83965785db1eec019edf1fc272b1aa393e6dc57

And they even banned that guy account as "he was trolling"… when in fact he was showing his point that GitHub is bugged big time…

The bug/feature is really in rails which github is built on, they should have used Yii style validation rules to prevent this kind of thing :)

Github have unsuspended the guy’s account now, I think they dealt with it pretty reasonably to be honest, at least it wasn’t a permanent ban.

Rails models properties are all safe by default? If I saw this in Yii I would never started using it.

There is a thread about Rails/Yii mass assignement - http://www.yiiframework.com/forum/index.php/topic/29539-github-ruby-based-hacked-by-mass-assignment-yii-is-safe/

Just a noob question:

On this website, the Yii download link http://yii.googlecode.com/files/yii-1.1.10.r3566.tar.gz points to googlecode and his date is Feb 12, 2012.

If I want a more updated version of Yii (saying the one with that issue fix or that absolutely must have gii feature, can I get them by simply downloading the zip tarball from Github or have I to deal with some git commands ?


The version on the download page is the "release" version… the tarball is the development version…

To get a version with the issue fixed you can use the github zip file… but you need to understand that this is a development version… it can happen that an another issue is possibly under development and not functional…

If you want just the fix for a specific issue then you can get just those files fixed with that issue and replace the one in the release version.

Ok, thank you mdomba

Related news: PHP moved to github.

I think the svn-sync routine is not working, the last commit on the svn server is Feb 19.

Not needed, Github has built-in SVN support: https://github.com/blog/966-improved-subversion-client-support

Fun fact: I’m listed ahead of qiang in the list of contributers. This should really be sorted differently :lol:

I didn’t want to litter the github bugtracker or open a new thread, but: The source code links in the API documentation are still pointing at Google Code. Could this be changed so everything is linked to the code on github?