git-status

Git status incorrectly saying files are deleted

て烟熏妆下的殇ゞ 提交于 2021-02-10 05:41:43
问题 I cloned a repository and edited exactly one file in it, tip.php , and then added it using git add . But when I next run git status I get the following: $ git status On branch removeRatings Changes to be committed: (use "git reset HEAD <file>..." to unstage) deleted: .htaccess deleted: COPYRIGHT.txt modified: tip.php Even though neither .htaccess or COPYRIGHT.txt was deleted, as I can see them right in the directory. Anyone have a reason why this would happen? I'm running Git Bash on Windows

Entire computer in Git status untracked files

你说的曾经没有我的故事 提交于 2021-02-06 11:32:46
问题 I'm new to git and I think I accidentally cloned in the root directory. When I committed one file (index.html) I noticed my whole computer (my desktop, my documents, etc) all in untracked files. I deleted the repository and I want to remove all the untracked files, obviously without deleting everything from my computer. I am new and paranoid about losing my files. 回答1: You must have run git init somewhere. You need to find the folder you ran this in. Just run: git status somewhere you think

Android Studio's git commit not seeing my modified files

我只是一个虾纸丫 提交于 2020-05-24 04:01:25
问题 I am more familiar with using git on the command line (MacOS, especially). However, I sometimes try to use the Android Studio VCS "commit", as it is sometimes slightly faster to use. The weird problem that I came across today is that Android's Studio git "commit" does not see my 4 modified files, whereas from the command line, git status shows clearly the 4 modified files. I have seen this Stack Overflow post and I have checked it is not for any of these reasons (like, not adding the file to

git show modify files but i don't change anything git reset did not work

痴心易碎 提交于 2019-12-30 08:33:18
问题 I clone repository switch to my branch and when i print git status i see modify files, i try to do git reset --hard but there was no effect :(( git status On branch release Changes not staged for commit: modified: htdocs/fonts/OfficinaSansBoldC.eot modified: htdocs/fonts/OfficinaSansBoldC.svg modified: htdocs/fonts/OfficinaSansBoldC.ttf modified: htdocs/fonts/OfficinaSansBoldC.woff modified: htdocs/fonts/OfficinaSansC-Book.eot modified: htdocs/fonts/OfficinaSansC-Book.svg modified: htdocs

git show modify files but i don't change anything git reset did not work

倾然丶 夕夏残阳落幕 提交于 2019-12-30 08:33:11
问题 I clone repository switch to my branch and when i print git status i see modify files, i try to do git reset --hard but there was no effect :(( git status On branch release Changes not staged for commit: modified: htdocs/fonts/OfficinaSansBoldC.eot modified: htdocs/fonts/OfficinaSansBoldC.svg modified: htdocs/fonts/OfficinaSansBoldC.ttf modified: htdocs/fonts/OfficinaSansBoldC.woff modified: htdocs/fonts/OfficinaSansC-Book.eot modified: htdocs/fonts/OfficinaSansC-Book.svg modified: htdocs

git Status Shows Same File Twice - But with different path slash styles

限于喜欢 提交于 2019-12-25 04:19:21
问题 When I do a git status , I see a change list that looks like this: # modified: CustomizablePDFs/InvoiceAdapter.php # deleted: "CustomizablePDFs\\Model/AlignContainer.php" If I add then commit CustomizablePDFs/InvoiceAdapter.php, it will be commited (as it should be) and no longer appear in the status list (good). However, git status will still show deleted: "CustomizablePDFs\\Model/AlignContainer.php" on the status list. If I do a git rm using that file path, it fails saying that the pathspec

How to list all unchanged (tracked) files?

痴心易碎 提交于 2019-12-22 05:17:10
问题 I unzipped an older "git-image" onto my git repository and most of the files have been changed. I would like to know which files remained untouched. How to list these files? 回答1: I didn't find anything purely git, but with some bash it is possible: ( git ls-files --modified ; git ls-files ) | sort | uniq -u explanation git ls-files lists all files tracked by git git ls-files --modified lists all the modified files tracked by git the rest is some bash scripting to remove the duplicates from