0

I've got a series of HTML pages and other files for a website hosted on heroku sitting under a folder named 'sitename' on the User level of my computer - Windows 8 64 bit (that is, the files are in 'C:\Users\Me\sitename'

I'm trying to deploy them to the site using this code:

$ git add .
$ git commit -am "make it better"
$ git push heroku master

When I execute '$ git add .', the console starts returning tons of messages naming certain files and saying 'The file will have its original line endings in your working directory. warning: LF will be replaced by CLRF'.

Reading the question here, I found that it probably wouldn't affect anything in my code. However, when I run the code, it doesn't just affect the files in my git repository (which I think is set up correctly by running '$ git init', which creates a .git folder on the same level as the sitename folder), but starts to affect files in my AppData folder, e.g. iTunes.

Is this expected behavior? Will it affect anything? And is there a way to direct 'git add' towards only the repository?

Community
  • 1
  • 1
pyg
  • 377
  • 1
  • 5
  • 17

1 Answers1

0

I would recommend investigating where your git folder really is for your project first. Because it seems like you have somehow added files from the Appdata folder to your project, this indicates that the git folder you have created is not seperated from the other folders on the server. For example you have your git folder in:

'C:\Users\Me' instead of 'C:\Users\Me\sitename'

To easily see what files that have been added to your git project/Hasn't been added you can execute the command: git status

This will also show your current staged files and if you have commited something.

To add single files/folder just write: git add example.html

Where example is the name of the file you want to add (it can be any extension).

To remove files just do the same but use git rm.

Englund
  • 1,067
  • 7
  • 13