librelist archives

« back to archive

How to push changes to my repository in nesta-theme-bootstrap which i use as a git submodule

How to push changes to my repository in nesta-theme-bootstrap which i use as a git submodule

From:
Sebastian Bachmann
Date:
2012-10-19 @ 16:59
Hi,

i setup a little website via nesta and added the nesta-theme-bootstrap[1] 
as a git submodule.
Now i have made changes to this theme and want to push the changes to my 
repository,
but i am not sure how to do this.

I can commit the changes, but i can not push them.

Thank you in advance for your answer.

[1] https://github.com/mchung/nesta-theme-bootstrap

Regards,
Sebastian
---
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

Re: [nesta] How to push changes to my repository in nesta-theme-bootstrap which i use as a git submodule

From:
Graham Ashton
Date:
2012-10-20 @ 07:22
Hi Sebastian. Where are you trying to push them to?

If you're deploying to heroku then you won't be able to use submodules, 
but should copy the theme files into your app. That's what the "nesta 
approved" approach in the theme's README does, and heroku is the reason it
does it.

Cheers,
Graham

On 19 Oct 2012, at 17:59, Sebastian Bachmann <sebastianbachmann@macbay.de> wrote:

> Hi,
> 
> i setup a little website via nesta and added the 
nesta-theme-bootstrap[1] as a git submodule.
> Now i have made changes to this theme and want to push the changes to my
repository,
> but i am not sure how to do this.
> 
> I can commit the changes, but i can not push them.
> 
> Thank you in advance for your answer.
> 
> [1] https://github.com/mchung/nesta-theme-bootstrap
> 
> Regards,
> Sebastian
> ---
> ()  ascii ribbon campaign - against html e-mail 
> /\  www.asciiribbon.org   - against proprietary attachments
> 
> 

Re: [nesta] How to push changes to my repository in nesta-theme-bootstrap which i use as a git submodule

From:
Sebastian Bachmann
Date:
2012-10-20 @ 09:45
Hi Graham,

Am 20.10.2012 um 09:22 schrieb Graham Ashton:

> Where are you trying to push them to?
i want to push the changes that i have made in the theme to my own 
bitbucket repository. I have started a new project at work and wanted to 
work later on this project at home, but the theme was missing. And i think
to add the bootstrap theme everytime by firing up the git add submodule 
command is not the masterplan :-) ...

Regards,
Sebastian
---
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

Re: [nesta] How to push changes to my repository in nesta-theme-bootstrap which i use as a git submodule

From:
Graham Ashton
Date:
2012-10-20 @ 09:51
On 20 Oct 2012, at 10:45, Sebastian Bachmann <sebastianbachmann@macbay.de> wrote:

> i want to push the changes that i have made in the theme to my own 
bitbucket repository. I have started a new project at work and wanted to 
work later on this project at home, but the theme was missing.

I see. Git submodules can seem a bit weird until you get your head around them.

Make sure you're pushing to your own fork of the theme (you've probably 
sorted that already), and then, in the parent repo, make sure that you've 
added and committed the submodule. Any changes made in the submodule will 
require a corresponding add/commit in the parent repo, as the parent keeps
a pointer the specific version that the submodule is at.

Then, on a machine where you check out the parent repo, you'll need to do this:

$ git submodule init
$ git submodule update

In future (when you just need to pull changes) you can just do git 
submodule update, without the init.

The section headed "Cloning a Project with Submodules" on this page covers
it pretty thoroughly:

http://git-scm.com/book/en/Git-Tools-Submodules

Cheers,
Graham

--
Graham Ashton
Founder, The Agile Planner
http://www.theagileplanner.com | @agileplanner | @grahamashton