Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing Octopress on multiple computers. #755

Closed
robotsandcake opened this Issue Sep 12, 2012 · 14 comments

Comments

Projects
None yet
6 participants
@robotsandcake
Copy link

robotsandcake commented Sep 12, 2012

Hi there,

I'm now at the stage where I can get up and go and use the computer in my office, however when I cloned the repository on the office machine it didn't clone everything. The installation of Octopress went really well on my laptop but I would now like to be able to edit the same blog on both computers.

I tried pulling from the repository but it only downloaded the contents of the _deploy directory as far as I can tell, I've been reading about Git all morning and I simply cannot work out how to do it.

So I have 2 questions:

Firstly, is what I want to do feasible and secondly could you point me in the right direction of a solution please?

Many thanks

@kitchen

This comment has been minimized.

Copy link

kitchen commented Sep 13, 2012

On Wed, Sep 12, 2012 at 04:03:20AM -0700, hackingcough wrote:

Hi there,

I'm now at the stage where I can get up and go and use the computer in my office, however when I cloned the repository on the office machine it didn't clone everything. The installation of Octopress went really well on my laptop but I would now like to be able to edit the same blog on both computers.

I tried pulling from the repository but it only downloaded the contents of the _deploy directory as far as I can tell, I've been reading about Git all morning and I simply cannot work out how to do it.

do git checkout source on your new machine, and it will grab the
branch from upstream (in fact, it already has it) and track it.

you may also want to tell github to use a default branch of 'source'
instead of 'master'

-Jeremy

@robotsandcake

This comment has been minimized.

Copy link
Author

robotsandcake commented Sep 15, 2012

Thanks for the reply, I have checked out the source branch onto my other computer and everything seems to be hunky-dory so far.

One thing I'm not so sure about is, why would I want to use a default branch of source instead of the master branch that is set up when first installing Octopress?

Once again, thanks for the help.

@zanshin

This comment has been minimized.

Copy link
Contributor

zanshin commented Sep 15, 2012

Having your site on the source branch isolates it from changes to the framework. You can checkout the master branch and update Octopress, and then merge those updates into your site (source).

@kitchen

This comment has been minimized.

Copy link

kitchen commented Sep 16, 2012

On Sat, Sep 15, 2012 at 10:34:48AM -0700, Mark Nichols wrote:

Having your site on the source branch isolates it from changes to the framework. You can checkout the master branch and update Octopress, and then merge those updates into your site (source).

actually, it's because if you're deploying to github pages, it deploys
from the 'master' branch. And octopress is not directly renderable
through github pages, so you have to pre-render it, and github will
deploy the static site.

Isolating from upstream simply requires a change to which remote branch
your current branch tracks, so you don't actually have to use a branch
other than master in that case.

-Jeremy

@robotsandcake

This comment has been minimized.

Copy link
Author

robotsandcake commented Sep 24, 2012

Hi guys,

Using git checkout sourcedid the trick perfectly.

I have another question however; on my laptop I have three or four branches each containing a new post I'm working on, is there a way to pull all of the branches in my repository to my desktop in one go? Or do I have to do check each one of them out individually?

Thanks again for all your help!

@scottcheng

This comment has been minimized.

Copy link

scottcheng commented Nov 7, 2012

Just came across this issue when searching for tips on setting up Octopress on multiple machines...

I have another question however; on my laptop I have three or four branches each containing a new post I'm working on, is there a way to pull all of the branches in my repository to my desktop in one go? Or do I have to do check each one of them out individually?

I don't know an easy way to checkout all branches at once. But concerning your goal, why not just set each of the unfinished posts to published: false? Isn't that easier to manage than multiple branches?

@nicinabox

This comment has been minimized.

Copy link

nicinabox commented Nov 7, 2012

@escapefromthebluebedroom Like @scottcheng said, it would probably be much easier to manage your posts with the published flag in one branch. You cannot checkout multiple branches at once. My recommendation would be to merge all these branches back into the branch that you'll use for managing posts.

@robotsandcake

This comment has been minimized.

Copy link
Author

robotsandcake commented Nov 7, 2012

@scottcheng @nicinabox You're probably right about using the published: false flag, my only problem is that having published and unpublished posts inside my _posts folder can get really confusing when one is taking large amounts of opiates (prescribed I might add!). So I thought that using branches might give me some degree of separation, so that when I look inside the _posts folder I know that whatever is in there has already been published.

I understand that this is somewhat of an edge case, and were it not the medication then your advice to use the published: false would definitely be the way to go. I might try giving it a go and seeing if I can work out some system by which I can differentiate between published and unpublished post, so I don't make a mistake and publish something inadvisable!

Again, thanks for helping, really appreciate it :-)

@nicinabox

This comment has been minimized.

Copy link

nicinabox commented Nov 7, 2012

Hey, that's fair. What about updating the rake task to create new posts in a draft folder by default? Then you could move it to posts when you're ready to publish it. Your posts are separated for clarity and all in the same branch then.

@robotsandcake

This comment has been minimized.

Copy link
Author

robotsandcake commented Nov 7, 2012

@nicinabox That is a genius idea!

I can only see one problem with that idea, in that I have absolutely no idea how to implement it! I will need to do some reading, you have any tips that might help by any chance?

Cheers

@nicinabox

This comment has been minimized.

Copy link

nicinabox commented Nov 7, 2012

Honestly, I wouldn't mind having this feature for myself. I'll see If I can whip something up tonight.

@robotsandcake

This comment has been minimized.

Copy link
Author

robotsandcake commented Nov 7, 2012

Wow, thanks! I will see if I can come up with something as well, It's time to hit Google for me :-)

@nicinabox

This comment has been minimized.

Copy link

nicinabox commented Nov 7, 2012

Actually, this may be a bit trickier than it sounds. _posts is a folder that's hardcoded in jekyll. It may be difficult to get jekyll to watch a _drafts in the same way as there's no configuration that surrounds it.

You could still put draft files there, but you'd have to move them manually when you're ready and you wouldn't be able to preview them.

@parkr

This comment has been minimized.

Copy link
Collaborator

parkr commented Dec 17, 2012

Setup 2 repos: one for the deploy (usually username.github.com or something) and one for the octopress source.

If you're still having problems, please start a new topic in the Octopress Google Group, where we'll be taking care of non-dev issues. Thanks!

@parkr parkr closed this Dec 17, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.