How to make changes that only I see?

For example, Id like to change the login page, so it automatically logs me in.

I want these changes to ONLY work on my development station and not be visible in push. if I do this on a branch, than I have to somehow smooth out this change before each click.

is git supported?

+7
git local
source share
3 answers

Why not use setup a gitattributes filter driver ?

smudge

Each time you check your directory, it checks with a script in the smudge step) for this file (and only this file) if a certain condition is fulfilled (for example, "this or not your development" station ") and accordingly change the content.
The clean step would restore its contents, or at least ignore this particular modification.

+2
source share

If you have at least Git 1.7.0, you might like this “plumbing” bit:

 git update-index --skip-worktree -- path 

From the git update-index man page in the “Skip-worktree bit” section :

The Skip-worktree bit can be defined in one (long) sentence: when reading a record, if it is marked as skip-worktree, then Git pretends that its working directory version has been updated and read the index version instead.

To clarify, “reading” means checking for the existence of a file, reading file attributes, or file contents. The working directory version may or may not be present.

the "skip-working line bit" underlies the relational mechanism described in the git read-tree manpage` .


In earlier versions of Git ( git update-index --assume-unchanged ) there is a related bit, but it should not be used for the purpose of OP. It seems like this might be useful for the OP situation , but Git that his contract ("promise") makes him unsuitable for such purposes .

+7
source share

I'm not sure I understand the question: why can't you just separate? You have master your main, public branch and save your private branch to master (or merge the master with your private branch). Never add your chances for master , just bring changes with master to your private branch.

If you happen to make changes to your private branch with which you want to share with master , there are no problems with cherries - select the changes to the master.

0
source share

All Articles