version control - How to prevent git stash dropping changes to files with the "assume unchanged" bit? -


i have used git update-index --assume-unchanged on files keep changes them being committed.

when using git stash in repository, changes stashed along other outstanding changes. expected behaviour, git stash pop doesn't bring them back, changes lost.

anyone know how either prevent files assume unchanged bit having changes stashed? alternatively perhaps know how make sure changes stashed against files @ least brought back?

assume-unchanged performance hack, , represents promise file has not changed. if change file bets off. should either rearchitect repo don't commit these files (perhaps commit filename.sample , .gitignore filename) or play tricks branches files not want shared rest of world off on branch or otherwise hidden.

i have seen/thought of 4 suggestions on how hide these changes.

1: use smudge/clean filter change file want on checkout , clean on checkin. ugly.

2: create local configuration branch described in http://thomasrast.ch/git/local-config.html critical thing remember here develop on primary branch , merge onto config branch testing. out primary branch change, push, etc.

3: create private development branch, make change never want shared, , make fake merge (git merge -s ours privatebranch). can develop , test on private branch , change not want shared should not when merge back, long change far away normal work. however, when new changes upstream, need pull them directly upstream private branch. merge private master , push upstream master. must never merge master private. likewise, must never rebase (well, possibly rebase -p work, no guarantees). these merge/rebase , each must occur makes less attractive.

4: create private development branch, make change never want shared, , create merge driver (see man gitattributes) refuse merge file in question master private or private master (probably comparing sha of file on private branch various branch's shas , copying previous value if matches).


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -