Re: tracking file locally without pushing it to remote

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

 



On Sat, Jul 23, 2011 at 2:23 AM, neubyr <neubyr@xxxxxxxxx> wrote:
> I have two configuration files in a project which I would like to
> track locally, however avoid pushing them to the remote repository. Is
> it possible do that? Any suggestions on how can it be done?

Manage the configuration files in a different repository (but with the
same working tree). Git does not support sharing worktree this way, so
it's a bit inconvenient. Maybe other people can give more suggestions.

# Initialize a config repo, place it at $GIT_DIR/config.git so it's hidden
GIT_DIR=`git rev-parse --git-dir`/config.git
GIT_WORK_TREE=/path/to/worktree git init
# Work on all files as usual, when you need to commit config files
GIT_DIR=`git rev-parse --git-dir`/config.git git <command>

Create some aliases to shorten the commands. Branch switching will be
a problem, since you have to switch branch on two repositories
consistently.
-- 
Duy
--
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]