git-index Questions
4
To use git effectively (and as intended) I make small atomic commits, while I do have longer sessions where I do change not only one thing. Thus, I make heavy use of git add -p. This doesn't work f...
7
Solved
I have a disk partition (format: NTFS) shared by Windows and Linux. It contains a git repository (about 6.7 GB).
If I only use Windows or only use Linux to manipulate the git repository everything ...
6
Solved
The book Pro Git says that the staging area is just a list, or index, that says which files will be committed when a git commit is done, and now the name index is more commonly known as the "stagin...
2
Solved
I'm trying to apply a .patch file to my source, but it fails because my file index (10655) is older than the patch index (10755).
Now I know that I can just modify the patch's file index but I wo...
6
Solved
What is the point of git add . or git add <filename> to add it to the staging area? Why not just git commit -m "blabla"?
I don't understand the value of the staging area.
6
Solved
What is the point of git add . or git add <filename> to add it to the staging area? Why not just git commit -m "blabla"?
I don't understand the value of the staging area.
15
Solved
In a Git tutorial I'm going through, git commit is used to store the changes you've made.
What is git push used for then?
Voiceless asked 30/4, 2010 at 14:17
3
Solved
I have local changes to a file that I don't want to commit to my repository. It is a configuration file for building the application on a server, but I want to build locally with different settings...
3
Solved
I have local changes to a file that I don't want to commit to my repository. It is a configuration file for building the application on a server, but I want to build locally with different settings...
2
Solved
After I run git update-index --assume-unchanged path/to/file on a particular branch, I'm unable to switch branches using git checkout.
It throws the following error:
error: Your local changes to t...
7
Solved
What does the Git index exactly contain, and what command can I use to view the content of the index?
Thanks for all your answers. I know that the index acts as a staging area, and what is committ...
1
Solved
When there's a conflict, git status shows this:
Unmerged paths:
(use "git restore --staged <file>..." to unstage)
(use "git add <file>..." to mark resolution)
bot...
Orosco asked 30/1, 2021 at 10:12
3
Solved
While reading how to use Git, I found a lot of different names for git index.
They were:
directory cache
current directory cache
staging files
staging area
How come there are so many options ...
11
Solved
I have run the following command to ignore watching/tracking a particular directory/file:
git update-index --assume-unchanged <file>
How can I undo this, so that <file> is watched/trac...
Yetta asked 19/6, 2013 at 15:57
2
Solved
When I first started using Git, I found the checkout command quite confusing. However, as I adapted to Git's model of version control, it started to make sense. Now I am having to teach Git to my c...
Gang asked 3/3, 2015 at 16:44
5
When a pre-commit hook runs, the repository might not be clean. So if you naively run your tests, they will not be against what you're committing, but whatever happens to be in your working tree.
T...
Windbound asked 7/9, 2012 at 14:36
3
Solved
From this picture, a commit is a pointer to the root tree which is a pointer to other trees and blobs. But what is a proper view of the index?
Questions:
Is it a similar tree-ish with folder ...
3
I accidentally deleted .git/index, is there a way to recover it? It's permanently deleted. I haven't committed anything yet.
2
Solved
I do not have a specific problem at hand, but I have encountered in the past some cases where I accidentally blew up my index, and wished I could go back the the previous state of a given file, whi...
Nth asked 6/7, 2016 at 12:1
1
Solved
The receive.denyCurrentBranch config option controls what happens if you push to a repo's branch that is checkout.
By default, it rejects it (which is why you usually only push to bare repos, whi...
Inductance asked 9/1, 2016 at 17:42
2
Solved
I like to modify config files directly (like .gitignore and .git/config) instead of remembering arbitrary commands, but I don't know where Git stores the file references that get passed to "git upd...
8
How can I uncommit my last commit in git?
Is it
git reset --hard HEAD
or
git reset --hard HEAD^
?
1
Solved
I have a fuzzy idea of what the git index contains as one does git-adds and git-commits, but I don't have a clue of what happens to these contents when one does a git-merge. I'm particularly intere...
2
Solved
During development, I routinely add working versions of files (but not commit them) to my git repo. I continue to work on those files, till they reach commitable stage, when I can commit them. So t...
2
I have a certain file in my repo that I have set the assume unchanged bit on:
git update-index --assume-unchanged someFile.txt
Once in a while, after some work on the repo, that bit is unset and...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.