-2

I am trying to stage files but I am unable to do. I ran git add [file_name]and I ran git status. I am getting bunch of other files which are staged, which are not staged and which are untracked but I am not finding my file anywhere in that

aditya royal (master *+) kaggle_projects $ git add squareregression.py
warning: LF will be replaced by CRLF in .spyproject/workspace.ini.
The file will have its original line endings in your working directory.
aditya royal (master *+) kaggle_projects $ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   untitled1.py

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)

        modified:   .spyproject/workspace.ini
        deleted:    preprocessing.py
        modified:   top20.R
        modified:   trail.txt
        modified:   untitled3.py
        modified:   untitled5.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        .ipynb_checkpoints/
        1-09-2017.py
        2015-scipy/
        31-08-2017.py
        Datetime_Example.ipynb
        Getting_data (1).ipynb
        Getting_data (2).ipynb
        Getting_data.ipynb
        NHVTMA.html
        New Text Document (3).txt
        Untitled.ipynb
        Untitled1.ipynb
        Untitled2.ipynb
        Untitled3.ipynb
        Untitled4.ipynb
        Untitled5.ipynb
        __pycache__/
        birth.txt
        company_facebook.py
        datetime_objects (1).ipynb
        datetime_objects (2).ipynb
        datetime_objects.ipynb
        debug.log
        deep learning.py
        duplicate_Regression.py
        duplicate_Regression_2.py
        duplicate_regression_1.py
        email_extrctor.py
        email_extrctor.pyc
        facebook3.py
        facebook_experiment.py
        facebook_scrap.py
        facebook_scrap.xlsx
        final2.csv
        final9.csv
        geckodriver.log
        hose.png
        house.png
        houseprices.py
        index.ipynb
        lonallstateclaim.py
        loncountry unemplyment.py
        lonmcdonalds.py
        lonmoviemetadata.py
        lonpreprocessing.py
        lonuntitled1.py
        lonuntitled22.py
        lonuntitled3.py
        lonuntitled56.py
        lonuntitled60.py
        lonuntitled9.py
        names.csv
        notes/
        original_extract.py
        output.csv
        output.txt
        people.csv
        people2.csv
        people22.csv
        proj_nltk.py
        projtextblob.py
        regularised linear model house.py
        skimage-tutorials-master/
        staruntitled69.py
        stock_analysis.py
        temp-plot.html
        timer.py
        timer.pyc
        untitled10.py
        untitled100.py
        untitled101.py
        untitled102.py
        untitled103.py
        untitled104.py
        untitled105.py
        untitled106.py
        untitled107.py
        untitled108.py
        untitled109.py
        untitled11.py
        untitled110.py
        untitled111.py
        untitled112.py
        untitled113.py
        untitled114.py
        untitled115.py
        untitled116.py
        untitled117.py
        untitled118.py
        untitled119.py
        untitled12.py
        untitled120.py
        untitled121.py
        untitled122.py
        untitled123.py
        untitled124.py
        untitled125.py
        untitled126.py
        untitled127.py
        untitled128.py
        untitled129.py
        untitled13.py
        untitled14.py
        untitled15.py
        untitled16.py
        untitled17.py
        untitled18.py
        untitled19.py
        untitled20.py
        untitled21.py
        untitled22.py
        untitled23.py
        untitled24.py
        untitled25.py
        untitled26.py
        untitled27.py
        untitled28.py
        untitled29.py
        untitled30.py
        untitled31.py
        untitled32.py
        untitled33.py
        untitled34.py
        untitled35.py
        untitled36.py
        untitled37.py
        untitled38.py
        untitled39.py
        untitled40.py
        untitled41.py
        untitled42.py
        untitled43.py
        untitled44.py
        untitled45.py
        untitled46.py
        untitled47.py
        untitled48.py
        untitled49.py
        untitled50.py
        untitled51.py
        untitled52.py
        untitled53.py
        untitled54.py
        untitled55.py
        untitled56.py
        untitled57.py
        untitled58.py
        untitled59.py
        untitled60.py
        untitled61.py
        untitled62.py
        untitled63.py
        untitled64.py
        untitled65.py
        untitled66.py
        untitled67.py
        untitled68.py
        untitled69.py
        untitled7.py
        untitled70.py
        untitled71.py
        untitled72.py
        untitled73.py
        untitled74.py
        untitled75.py
        untitled76.py
        untitled77.py
        untitled78.py
        untitled79.py
        untitled8.py
        untitled80.py
        untitled81.py
        untitled82.py
        untitled83.py
        untitled84.py
        untitled85.py
        untitled86.py
        untitled86.pyc
        untitled87.py
        untitled88.py
        untitled88.pyc
        untitled89.py
        untitled9.py
        untitled90.py
        untitled90.pyc
        untitled91.py
        untitled92.py
        untitled93.py
        untitled94.py
        untitled95.py
        untitled96.py
        untitled97.py
        untitled98.py
        untitled99.py
        wellsfargo.py
        zillow/
aditya royal (master *+) kaggle_projects $ git ls-files
.RDataTmp
.gitignore
.spyproject/codestyle.ini
.spyproject/encoding.ini
.spyproject/vcs.ini
.spyproject/workspace.ini
New Microsoft Excel Worksheet.xlsx
column_withoutna.png
column_withoutnan.png
demo_gridspec01.py
genderclassmodel (3).csv
gg.png
homicide.R
imdb.png
kaggle_projects.Rproj
master
preprocessing.py
squareregression.py
top20.R
totalview.png
trail.txt
untitled0.py
untitled1.py
untitled2.py
untitled3.py
untitled4.py
untitled5.py
untitled6.py
wrong_facet.png
y.csv
warning: LF will be replaced by CRLF in .spyproject/workspace.ini.
The file will have its original line endings in your working directory.
Aditya Matturi
  • 119
  • 1
  • 7

1 Answers1

1

According to your output of git ls-files, the file squareregression.py is already in your repository. If you have not changed it, then the result of running git add squareregression.py is no effect. This means that your file name will not show up in the output of git status.

Git appears to be working as designed.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • I edited my file and tried it again but I am not finding it – Aditya Matturi Feb 01 '18 at 02:38
  • It is possible to ask Git to disregard changes to files already in a repository. It involves running [commands you are unlikely to type by accident](https://stackoverflow.com/questions/655243/ignore-modified-but-not-committed-files-in-git), but it may be worth checking this in any case. Otherwise, check the obvious things - like after changing your file in your editor, have you saved it? in the correct place? – Greg Hewgill Feb 01 '18 at 02:50