git-assume-unchanged

How to `--assume-unchanged` file in project?

点点圈 提交于 2019-12-11 14:12:21
问题 I have config file: conf/local.conf I run next command for it: git update-index --assume-unchanged local.conf and it is OK until I switch to another branch or pull. How to preserve --assume-unchanged flag between branches? UPD Some examples what is coming on: $ git checkout 296-ToS-component error: Your local changes to the following files would be overwritten by checkout: conf/local.conf Please commit your changes or stash them before you switch branches. Aborting $ git checkout -f 296-ToS

Does git update-index --skip-worktree affect the upstream repo?

岁酱吖の 提交于 2019-12-07 10:18:38
问题 I've been working with git for a while myself, and am now setting up a repo for our team. We develop a eCommerce platform. There are a few directories and files to be ignored, such as the upload directory and environment specific config files. While the config files are on .gitignore, I'd like to ignore the uploads directory with either --skip-worktree or --assume-unchanged . My question - which I couldn't find an explicit answer on - is if the --assume-unchanged or --skip-worktree bit will

Not Possible to switch branch after --skip-worktree

不羁岁月 提交于 2019-11-28 17:48:31
WHAT I WANT TO DO I have a file which contains sensitive datas so I don't want to push content of this file to remote server. WHAT I DID? To achieve this, I made a commit when the file was empty and pushed this empty file to server (GitHub). And then fill the file with sensitive datas and applied git update-index --skip-worktree path/to/file . But I didn't made any commit. Now I'm trying to switch my branch but I'm getting this error : error: Your local changes to the following files would be overwritten by checkout: path/to/file Please, commit your changes or stash them before you can switch

Not Possible to switch branch after --skip-worktree

懵懂的女人 提交于 2019-11-27 20:11:48
问题 WHAT I WANT TO DO I have a file which contains sensitive datas so I don't want to push content of this file to remote server. WHAT I DID? To achieve this, I made a commit when the file was empty and pushed this empty file to server (GitHub). And then fill the file with sensitive datas and applied git update-index --skip-worktree path/to/file . But I didn't made any commit. Now I'm trying to switch my branch but I'm getting this error : error: Your local changes to the following files would be