git-skip-worktree

Handling changes to files with --skip-worktree from another branch

懵懂的女人 提交于 2020-04-29 09:11:32
问题 On my machine, I've set --skip-worktree to config/database.yml . git update-index --skip-worktree config/database.yml Another developer has committed and merged into the develop branch changes to config/database.yml while working on the project. Now, when I do git pull origin develop , I get Andrews-Air:[project] agrimm$ git pull origin develop From bitbucket.org:[company]/[project] * branch develop -> FETCH_HEAD Updating [SHA]..[Another SHA] error: Your local changes to the following files

Git Skip Worktree on All Tracked Files inside Directory and its Subdirectories

本小妞迷上赌 提交于 2020-01-01 16:33:34
问题 Let's say I have this worktree that has already been tracked by git. . ├── parent │ ├── child1 │ | └── file1.txt │ ├── child2 │ | ├── file2.txt │ | └── grandchild │ | └── file3.txt │ ├── somefile.txt │ └── anotherfile.txt | I want to mark every tracked files inside parent so that any changes made to them woudln't be tracked by git anymore, which in the end would include somefile.txt , anotherfile.txt , file1.txt , file2.txt , file3.txt . .gitignore only works on untracked files so I'm using -

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