1

I am trying to commit some modified files to my git staging area with command git add. However the files are not adding to the staging area.

The below is the output of git status:-

  :~/Desktop/production-18-12-2013$ git status
    # On branch master
    # Changes not staged for commit:
    #   (use "git add/rm <file>..." to update what will be committed)
    #   (use "git checkout -- <file>..." to discard changes in working directory)
    #
    #   deleted:    app/assets/javascripts/application.js~
    #   deleted:    app/assets/javascripts/controllers/app.js~
    #   deleted:    app/assets/javascripts/menu.js~
    #   deleted:    app/assets/javascripts/services/userAPI.js~
    #   deleted:    app/assets/stylesheets/application.css~
    #   deleted:    app/assets/stylesheets/safariwindows.css~
    #   deleted:    app/assets/stylesheets/windowsapplication.css~
    #   deleted:    app/controllers/appi_controller.rb~
    #   deleted:    config/initializers/event_machine.rb~
    #   deleted:    public/assets/application-042a070a3832c680df06e7ea031766e7.js
    #   deleted:    public/assets/application-042a070a3832c680df06e7ea031766e7.js.gz
    #   deleted:    public/assets/application-17a2431c4f2227103425cec76c5b4507.js
    #   deleted:    public/assets/application-17a2431c4f2227103425cec76c5b4507.js.gz
    #   deleted:    public/assets/application-26253c7e7241dfc73bddea7e43ece04c.js
    #   deleted:    public/assets/application-26253c7e7241dfc73bddea7e43ece04c.js.gz
    #   deleted:    public/assets/application-321c36234afb9e931f847afc9e15356a.js
    #   deleted:    public/assets/application-321c36234afb9e931f847afc9e15356a.js.gz
    #   deleted:    public/assets/application-432a3132331e44e99dc825681de186fc.js
    #   deleted:    public/assets/application-432a3132331e44e99dc825681de186fc.js.gz
    #   deleted:    public/assets/application-4ce91df18f6d02b72a2d4fd6288b7e27.js
    #   deleted:    public/assets/application-4ce91df18f6d02b72a2d4fd6288b7e27.js.gz
    #   deleted:    public/assets/application-53f94195fd52dfe8bf42d8ce6f1d34ed.js
    #   deleted:    public/assets/application-53f94195fd52dfe8bf42d8ce6f1d34ed.js.gz
    #   deleted:    public/assets/application-5a7c32b4917ea37959fce75e96cda547.css
    #   deleted:    public/assets/application-5a7c32b4917ea37959fce75e96cda547.css.gz
    #   deleted:    public/assets/application-8c5483b4973e96b28612ecb18e4c3942.js
    #   deleted:    public/assets/application-8c5483b4973e96b28612ecb18e4c3942.js.gz
    #   deleted:    public/assets/application-a81a1274e455dbead72c22762b3c2a34.js
    #   deleted:    public/assets/application-a81a1274e455dbead72c22762b3c2a34.js.gz
    #   deleted:    public/assets/application-ceed710b515059aeb59a02f72b0b4dc3.js
    #   deleted:    public/assets/application-ceed710b515059aeb59a02f72b0b4dc3.js.gz
    #   deleted:    public/assets/application-ddabc637f1d7ed563483b991094b9692.js
    #   deleted:    public/assets/application-ddabc637f1d7ed563483b991094b9692.js.gz
    #   deleted:    public/assets/application-e47883af638c3eaeb828901746dc14a0.js
    #   deleted:    public/assets/application-e47883af638c3eaeb828901746dc14a0.js.gz
    #   deleted:    public/assets/application-e6c199f7b655bba181fdbabb83702335.js
    #   deleted:    public/assets/application-e6c199f7b655bba181fdbabb83702335.js.gz
    #   deleted:    public/assets/application-f546c5ac258ae2f4b2051bd5c09ad581.js
    #   deleted:    public/assets/application-f546c5ac258ae2f4b2051bd5c09ad581.js.gz
    #   deleted:    public/assets/application-f813e11ed5210d25e039736f7300b550.css
    #   deleted:    public/assets/application-f813e11ed5210d25e039736f7300b550.css.gz
    #   deleted:    public/assets/application.css
    #   deleted:    public/assets/application.css.gz
    #   deleted:    public/assets/application.js.gz
    #   deleted:    public/assets/application2-6a76bc78fbb8e38bfeb101cd769b3978.css
    #   deleted:    public/assets/application2-6a76bc78fbb8e38bfeb101cd769b3978.css.gz
    #   deleted:    public/assets/application2.css
    #   deleted:    public/assets/application2.css.gz
    #   deleted:    public/assets/ie-6051136603bde9acd2baf93c330af904.css
    #   deleted:    public/assets/ie-6051136603bde9acd2baf93c330af904.css.gz
    #   deleted:    public/assets/ie.css
    #   deleted:    public/assets/ie.css.gz
    #   deleted:    public/assets/jquery.min-2df7da5d7895835e8cc10130711ba4a6.map
    #   deleted:    public/assets/jquery.min.map
    #   deleted:    public/assets/manifest.yml
    #   deleted:    public/assets/rails-aa8aea913cd3b23f0cdf2a950a48069a.png
    #   deleted:    public/assets/rails.png
    #   deleted:    public/assets/safariwindows-64111c331f7b5da9cc8cbb61b70edba5.css
    #   deleted:    public/assets/safariwindows-64111c331f7b5da9cc8cbb61b70edba5.css.gz
    #   deleted:    public/assets/safariwindows.css
    #   deleted:    public/assets/safariwindows.css.gz
    #   deleted:    public/assets/safariwindows2-54679b90e662ef9657c0bac13cbfca79.css
    #   deleted:    public/assets/safariwindows2-54679b90e662ef9657c0bac13cbfca79.css.gz
    #   deleted:    public/assets/safariwindows2.css
    #   deleted:    public/assets/safariwindows2.css.gz
    #   deleted:    public/assets/untitled
    #   deleted:    public/assets/windowsapplication-ef6d76bdf635d72d487ee4c51cea9b27.css
    #   deleted:    public/assets/windowsapplication-ef6d76bdf635d72d487ee4c51cea9b27.css.gz
    #   deleted:    public/assets/windowsapplication.css
    #   deleted:    public/assets/windowsapplication.css.gz
    #   deleted:    public/assets/windowsapplication2-85d68c3cd237247123bb47428dc8a138.css
    #   deleted:    public/assets/windowsapplication2-85d68c3cd237247123bb47428dc8a138.css.gz
    #   deleted:    public/assets/windowsapplication2.css
    #   deleted:    public/assets/windowsapplication2.css.gz
    #
    no changes added to commit (use "git add" and/or "git commit -a")

and then write the command git add

But this is not helping me and git status is giving me the above output(same)

Is this because of git-update-index-assume-unchange command which i had put before git status

If so then how to solve this issue.I have gone to various forums but not getting the output.

Please help me with this

1
  • Were you able to resolve this? Commented Jan 27, 2014 at 15:47

3 Answers 3

1

I think you are trying to remove multiple intermittent files generated during from your repo, and have deleted each of these files manually and are now trying to commit the change.

If that is the case you need to use git rm to remove these.

In case you want to remove specific file, do git rm path/to/file

If you want to remove all files of a particular pattern, like *~, ~.gz, use git rm -r "*~" "~.gz" "~.png"

Also, I would suggest adding these patterns to your .gitignore file so that these files are not added in the future.

Sign up to request clarification or add additional context in comments.

Comments

1

You don't have any changed files. You've deleted files from the tree. Use git rm to stage files for deletion (as it tells you) and then commit.

Comments

0

have you ever tried git add --all

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.