git-index

git assume unchanged vs skip worktree - ignoring a symbolic link

陌路散爱 提交于 2019-11-27 19:44:44
I have a problems with a git repository and windows. The problem is that the git repository has a linux symbolic link in it and with developers running windows, that obviously does not work. Now since that symbolic link should never change, I want to find a way to delete that on developers and add a folder in its place (which is what the symbolic points to) but have git ignore those particular changes. Now I can remove the symbolic links, create a folder of the same name and just add a .gitignore that ignores everything. Now as far as making sure git ignore the removal of the symbolic link, I

“git rm --cached x” vs “git reset head --​ x”?

天涯浪子 提交于 2019-11-26 23:46:03
问题 GitRef.org - Basic: git rm will remove entries from the staging area. This is a bit different from git reset HEAD which "unstages" files. By "unstage" I mean it reverts the staging area to what was there before we started modifying things. git rm on the other hand just kicks the file off the stage entirely, so that it's not included in the next commit snapshot, thereby effectively deleting it. By default, a git rm file will remove the file from the staging area entirely and also off your disk

Why staging directory is also called Index/Git Index?

余生长醉 提交于 2019-11-26 23:01:29
问题 I was confused the naming of staging directory (Git Index) in Git. Is there any special meaning such that it is called Index? Why not just called Cache / or Temp directory so that we can understand more easily? To me, index is sth which help us to search things faster, like indexing in DBMS, how does it relate to the staging area??? I did some google search but still have no much idea. ref link Git Index 回答1: The article by the main Git maintainer Junio C. Hamano, is instructive, for grasping

git assume unchanged vs skip worktree - ignoring a symbolic link

做~自己de王妃 提交于 2019-11-26 19:51:18
问题 I have a problems with a git repository and windows. The problem is that the git repository has a linux symbolic link in it and with developers running windows, that obviously does not work. Now since that symbolic link should never change, I want to find a way to delete that on developers and add a folder in its place (which is what the symbolic points to) but have git ignore those particular changes. Now I can remove the symbolic links, create a folder of the same name and just add a

What are the differences between “git commit” and “git push”?

余生长醉 提交于 2019-11-26 02:38:59
问题 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? 回答1: Basically git commit " records changes to the repository " while git push " updates remote refs along with associated objects ". So the first one is used in connection with your local repository, while the latter one is used to interact with a remote repository. Here is a nice picture from Oliver Steele, that explains the git model and the commands: Read more about

Git - Difference Between 'assume-unchanged' and 'skip-worktree'

五迷三道 提交于 2019-11-25 21:46:16
问题 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. Naturally, the file always shows up when i do \'git status\' as something to be staged. I would like to hide this particular change and not commit it. I won\'t make any other changes to the file. After some digging around, I see 2 options: \'assume-unchanged\' and \'skip-worktree\'. A previous