Questions tagged [git-assume-unchanged]
14 questions
50
votes
8 answers
Not Possible to switch branch after --skip-worktree
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…

Eray
- 7,038
- 16
- 70
- 120
9
votes
1 answer
Does git update-index --skip-worktree affect the upstream repo?
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…

jgangso
- 638
- 10
- 19
7
votes
2 answers
How to `--assume-unchanged` file in project?
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…

Eugen Konkov
- 22,193
- 17
- 108
- 158
4
votes
2 answers
git assume-unchanged and git stash
I keep some of my local configuration in assume-unchanged files. I have several branches created over time, and assumed-unchanged files have evolved in between (adding more local config). If I try to checkout an older branch, I get:
error: Your…

edhel
- 183
- 10
1
vote
0 answers
Where are files marked as assume-unchanged in Git?
Yesterday I was struggling with Git, because I could not find any of the .java-files that I wanted to commit in neither Git Bash or Eclipse Git-tool.
I searched around and I found that allmsot every file that i evered touched in the project is…

Måns Sandberg
- 72
- 1
- 10
1
vote
1 answer
How can I reset my commits while keeping my assume-unchanged files in git?
I have quite many files that I set as
git update-index --assume-unchanged
In some cases my branch is messed up and diverged with origin/master. Let's say
and have 4 and 8 different commits each, respectively.
So I want to revert all my…

user3819226
- 461
- 1
- 5
- 17
0
votes
2 answers
Excluding .idea directory from project pulled by git clone
This seems like a very stupid and rudimentary question.
This seems to be due to my lack of understanding of git.
but I'm not good at English, it was difficult to properly search for an answer to this issue..
I tried to change my IDE from STS4 to…

gantodagee
- 43
- 3
0
votes
1 answer
git commit . ignoring assume-unchanged
I have a file which I have marked assume-unchanged in my checkout. This is respected by most commands (e.g. diff, add ., commit -a), but for some reason this command seems to be ignoring the flag:
git commit .
Is this a bug? If not, is there a flag…

Alice Purcell
- 12,622
- 6
- 51
- 57
0
votes
1 answer
How to add git update-index --assume-unchanged to VS Code git context menu?
How would I create a command/context menu option in VS Code, Source Control (GIT) window, which would recognize files I select under "Changes", and then allow me to choose "Assume Unchanged" from a context menu, and then it would perform: 'git…

julius patta
- 78
- 1
- 8
0
votes
2 answers
A file seems to still be tracked after running `git update-index --assume-unchanged `
I ran the command git update-index --assume-unchanged .\src\main\resources\application.properties in my local directory, and the application.properties file disappeared from the Changes section of Source Control in VS Code, as I expected.
However,…

Dan Bitter
- 229
- 4
- 12
0
votes
1 answer
Undo git update-index --no-assume-unchanged (not working) and be able to see these local changes again
Update:
My permissions issues somehow fixed themselves arbitrarily as now the exact same remote branch create command works, so (as you probably guessed) it wasn't caused by this tracking issue.
Now I'm just looking to fix the tracking issue.…

salemandreus
- 1
- 2
0
votes
1 answer
How do I ignore files when pulling from github?
I am working in Ruby and want to ignore my config files when I pull from Github.
The error I am receiving is:
"error: Your local changes to the following files would be overwritten by merge: config/database.yml"
Things I have tried:
1) I added the…

Peter Black
- 1,142
- 1
- 11
- 29
0
votes
0 answers
git set files to assume-unchanged
Git is always setting to assume-unchanged all the files from two of my repository. After each commit, checkout, pull, and so on, it set assume-unchanged on the modified files. I have to execute git update-index --no-assume-unchanged my_file to…

Quentin Silvestre
- 35
- 7
-1
votes
3 answers
git ignore and untrack folder on remote server
I know similar questions have been asked multiple times, but I cannot get it to work for my case.
Where I am:
I have a local repo that I push to a live server, that included a /content folder and its subfolders. During production that was okay,…

lthz
- 113
- 1
- 7