Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2012-03-20 10:29:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,437
Website GitHub

Re: Textpattern on GitHub

philwareham wrote:

My webserver is linux (CentOS 5), maybe we could put the shell script on there for the moment?

Sounds like an option. When I get an answer back from Graeme/Steve about the options open to us we’ll figure out the best way to host the script and keep things in sync.

Will we one day be able to send pull requests to the GitHub repo?

No good asking me: I’ve never even used git.

I just work here :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#14 2012-03-20 16:08:59

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Textpattern on GitHub

Phil, it seems you have done your commits on top of master branch.
I’d suggest you to undo and redo them (not really, as it just a matter of running a few git commands) on a new branch (let’s call it phil-experiments branch).

This will have the advantage that you will be able to keep the master branch of your fork up to date with the latest commits on upstream (official) master branch.
And then, you also get the advantage of being able to rebase the phil-experiments branch on top of master, each time master changes. If no conflicts, you can be sure that your experiments apply nicely on top of master branch, while keeping the phil-experimental commit history in a nice, linear shape (not filled with lot of merge commits).

I can also see, in the commit history of your master branch, that you have manually applied all the changes in SVN repo since Jan 30.
Now, I can understand that you did it because the (now official) Textpattern repo at GitHub got stucked at that day, and you wanted your master branch to reflect changes in SVN, so you resorted to applying them manually.

Being that you are asking here about being able to send, someday, a Pull Request (btw, Pull Requests are a GitHub feature, not a Git feature), all this “commit jugglery” you did on your master branch may not apply nicely to the official master branch.
In any case, I think that Pull Request can be done in a “per commit” basis (and not the whole series of commits), similar or equal to git cherry-pick.

TL;DR: Phil, I’d suggest you to keep your master branch clean, in sync with master branch from upstream (aka the now official TXP repo at GitHub), and have a phil-experiments branch, with your changes rebased on top of master.

In a serie of git commands:

git branch phil-experiments # Create new "phil-experiments" branch, based on your current (dirty) "master" branch. 
git reset --hard e5f9040ba3 # While still in "master", and you reset it to latest official commit.
git push -f origin master # Push & rewrite the "master" branch on your GH fork (I'm assuming it's named "origin").
git push origin phil-experiments # If you want to publish that branch on GH

Eventually, the master branch on upstream will get unstuck, and you will be able to rebase your phil-experiments branch on top of it. By that time, you may also want to get rid of all those unnecessary “Merge SVN as r1234” (or similar) commits. You will be able to do that by branching again from master (a new branch, let’s call it phil-master), and then, on that branch git cherry-pick each one of your substantial commits from phil-experiments branch (thus, discarding all the manual merging you did).

Have fun!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#15 2012-03-20 16:21:42

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Textpattern on GitHub

Just to add up to the confussion, I’ve my own Textpattern repo in GitHub:
github.com/maniqui/textpattern
which is not a fork of the (now official) github.com/textpattern/textpattern repo.

It includes an 4.4.1-mlp branch (with MLP already bundled), and most of the tags (I’ve discarded a few RC) corresponding to official releases. It also includes two extra tags related to the integration of the MLP.

For those interested in why I didn’t fork from the (now official, but not at that time) Textpattern repo, I tried to explain it here. Basically, I was just trying to learn and to scratch my own itch.

Edited to fix broken textile link.

Last edited by net-carver (2012-04-17 16:32:37)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#16 2012-03-20 16:36:13

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Textpattern on GitHub

Cheers Julián, I was going to erase my Textpattern fork and start again properly from scratch once the master (official) one was synced – but I’ll try your suggestions out for now, always eager to learn new stuff.

Offline

#17 2012-03-20 16:44:17

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Textpattern on GitHub

^^ :)

Also, I (wrongly) thought GH had some button to “sync back this fork with upstream (original) repo”, but no, it seems not.
So, the way to keep your master branch in sync with the upstream master branch is by adding the original repo as a remote and doing some simple fetch/merge/push dance.
More about that here: help.github.com/fork-a-repo/


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#18 2012-03-20 18:24:02

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Textpattern on GitHub

OK Julián, I think I get this?

I fork the official master, then make my master use upstream master as its source.

I can then keep my master in sync with the official master using git fetch upstream

Then I do all my work in a branch (or branches) of my master, and when I want to do a pull request I do it directly from my branch back to the upstream master (i.e. I don’t merge my branch into my master first)?

Last edited by philwareham (2012-03-20 18:24:53)

Offline

#19 2012-03-22 02:42:32

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Textpattern on GitHub

Truth be told, it’s really up to you what you want to do with the master branch, now that you have your very own fork. :)
You could do all your experimental work directly in the master branch of your fork, and each time the upstream master is updated, you could fetch those changes and rebase your master on top of those changes.

I understand that GH lets you do Pull Requests from any of your branches, and then, it let the other party to pick where to pull them.
So, yes, you won’t have to merge them back to your master branch.

Finally, and more important, you could be sure that the changes you do in your branches will apply cleanly to upstream master by rebasing those branches with upstream master (or your master, assuming you keep it “pure”, to match upstream).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#20 2012-03-22 07:09:31

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Textpattern on GitHub

Thanks for the tips Julián, very helpful. I’ve tried out a system that works for me now (keep my master clean and work in branches, pull request direct from branch to the upstream master).

Offline

#21 2012-04-01 17:14:35

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Textpattern on GitHub

How is it going? Any news about the script? Has there been any progress? Properly synched git repo would be amazing.

Offline

#22 2012-04-03 12:15:32

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Textpattern on GitHub

Hey devs, maybe you could ask Julián or Jukka to help set this up for you? We are itching to have a synced Github repo for our own experiments and to provide juicy new patches/commits for your consideration.

Offline

#23 2012-04-03 12:22:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,437
Website GitHub

Re: Textpattern on GitHub

philwareham wrote:

Hey devs, maybe you could ask Julián or Jukka to help set this up for you?

Graeme offered to keep it running, I just haven’t got back to him yet, sorry.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#24 2012-04-04 08:36:16

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Textpattern on GitHub

When this repo finally up and running again, people might find this guide useful…

How to GitHub: Fork, Branch, Track, Squash and Pull Request

Offline

Board footer

Powered by FluxBB