Re: Handling non-git config files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lee wrote:
So my quesstion is that is there any way to have several checked out
copies of a git repo each with their own slightly different config
files, yet still being able to perform git operations with respect to a
centralised repository as if they were identical?

Hi Richard,

Yes. They are called branches :)

What I do is have a branch for each version that I need.

To fix a problem I checkout master, make the repair, and commit.

Then to deploy that change I perform three steps (for each production version).

git checkout <clientBranch>
git rebase master
rsync to the production server (ignoring .git and temp files)

All the differences between versions - config files, images, logos, etc - are all included in the GIT, repo and I don't have to worry about them. To set up the branches, I simply checked out a new branch for each and applied the changes for that production version, and committed. It works very well in practise. (Do take care to checkout the version you want to work on before you start work, or you may have to lose your work to recover!).

Ian

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]