Sunday, January 5, 2020

git Changes not staged for commit remove message



>PROBLEM

git status command returns the following message:

  git Changes not staged for commit remove message


>SOLUTION

This kind of problem may be originated when a folder is added to .gitignore without adding and committing the repository before .gitignore inclusion and committing after.
A straightway is to move the folder that contains the inconsistency to a temporary folder. Then add and commit again.

Example, supposing the following project structure:

+-- myProjectRoot
+--folder1
+--folder2
+--folderWithIssue

To fix, do:

cd /home/myProjectRoot
- windows:
cd C:\myProjectRoot

git add *
git commit -am "my message here"

mv /home/myProjectRoot/folderWithIssue /home/temp
- windows:
move folderWithIssue C:\temp

git add *
git commit -am "my message here"
git push

mv /home/temp/folderWithIssue .
- windows:
move C:\temp\folderWithIssue .

git add *
git commit -am "my message here"
git push


No comments:

Post a Comment

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...