All Questions
10
questions
1
vote
1
answer
50
views
How to rename or remove file name with weird quotes and slashes in linux
When I run git status I get:
Untracked files:
(use "git add <file>..." to include in what will be committed)
"\231"
"\231\217\373\275\235Y"
So I ...
0
votes
0
answers
58
views
Lost previous commits and .git folder (all hashes lost) [duplicate]
TL;DR: I deleted the .git directory, recreated it with git init, then did a git commit, then did a git push using --force option and overwritten the remote repository with an empty one.
So as a total ...
-1
votes
2
answers
293
views
how can git commit -a work after i remove a file from index
Suppose I have tracked file empty.txt.
Now I remove file from working directory using rm empty.txt .
Now I am removing file from index using git rm empty.txt and now file should be untracked since I ...
0
votes
2
answers
373
views
What happens if I delete a file on a git branch using sudo rm -r from the file system locally
I deleted a file using sudo rm -r when on a dev branch locally . Now I can still view the file on other branches but I don't quite understand it fully. Also I think I have lost the file on the master ...
2
votes
2
answers
3k
views
How do I remove a folder, but keep all subfodlers and files, only in one git branch?
I am setting up a git branch that needs to have a different directory structure to the rest of them. The files are all the same, however, they must essentially all be moved a level up. There are a lot ...
1
vote
1
answer
47
views
How to use previous commit state in git and not present on same file?
I modified some project files(profilePage.js and profile.js) and then added them to commit, but I didn't push as I had a backup to delete. Then I accidentally deleted profile.js through powershell ...
1
vote
1
answer
2k
views
Git - rm: unrecognized option `--cached'
I added dist to my .gitignore but it was added to the tree in some other way.
I'm trying to remove it and clean up the tree using:
rm dist --cached
But am getting the error:
rm: unrecognized option ...
0
votes
1
answer
575
views
git rm -r removed "ignored" files. how can I get them back using git?
Edit: I was able to recover my files from the trash, so I don't need a solution, but I'm interested in knowing how to recover using git (since it created the problem) and why any git operation would ...
3
votes
2
answers
2k
views
How to git rm files that are on remote origin but not in local?
I have some .swp files that were created by my editor and committed previously by accident. Now I want to merge into master, but need to get rid of these files. I tried to delete them from my ...
3
votes
2
answers
99
views
Trouble removing oddly named files from github repo
I have recently acquired a couple corrupted files in my github repository. I have deleted them from my host but I'm having trouble removing them with git because they have messed up names. They show ...