Ask Your Question

Custom pdk-templates

asked 2018-05-18 14:00:56 -0500

nmajin gravatar image

I would like to understand the best way to work with custom pdk-templates. I cloned (not forked since I am trying to utilize this in Github Enterprise) and customized this repo to fit my liking. I removed a lot of configuration I know I will not use and I now can create modules with this custom template: i.e. pdk new/convert --template-url

However, I would like to ensure I get the latest development (git pull) from the main repo: but I don't want to add back the files and configuration I removed.

So, how should we technically be using custom templates in this case where we want to not include everything but the kitchen sink and also stay up-to-date with the latest development with it?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-05-18 17:12:41 -0500

binford2k gravatar image

I'm not sure what you mean by "not forked since I am trying to utilize this in Github Enterprise". Forking just means that you've got a clone of the repo in your namespace on GitHub. Based on the URL you mention later, it is a fork.

What you'll want to do is clone your repo to your local workstation and add an "upstream" remote back to the puppetlabs namespace. Then whenever you want to get updates, you can git fetch upstream to pull all the updates down and then git cherry-pick the commits you want into your own fork.

There are a bunch of git cherry pick tutorials. This one seems reasonable,

edit flag offensive delete link more


Thanks for the response. So yes, I am doing a clone and setting an upstream back to the source. I didn’t think of cherry picking so I guess his could be a solution. However, the amount of files puppet adds to the pdk-templates repo is nuts, so I can imagine spending a lot of time cherry picking.

nmajin gravatar imagenmajin ( 2018-05-26 09:47:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-05-18 14:00:56 -0500

Seen: 25 times

Last updated: May 18