0

Since not so long I started to work with git and I start to love it as I work in small teams as well.

Now I would like to push one of my projects with kind a large amount (13gb) of uploaded data.

As I don't need to have this data I am wondering how to push my code without the contents in my upload directory.

I've read documentation about how to init and push existing code but they write not to use the .gitignore file.

How do I push my code without the data from uploads/* in the right way?

Thank you in advance

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
directory
  • 3,093
  • 8
  • 45
  • 85
  • 2
    Please link to the documentation which supposedly says you shouldn't use `.gitignore`. If you're genuinely trying to ignore those files (which it sounds like you are) then `.gitignore` is the right way to go about it. – Jon Skeet Jan 02 '16 at 20:09
  • 2
    Any advice that says "not to use .gitignore" should be gitignored. – Oliver Charlesworth Jan 02 '16 at 20:09
  • is typically usage for .gitignore file. +1 for don't understand why you don't use this process of git to ignore the files to commit... – miltone Jan 03 '16 at 00:33
  • https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 1. :) – directory Jan 03 '16 at 09:58

1 Answers1

1

If you dont want git to track and upload any data in the uploads folder you should add it to the .gitignore file.

Assuming you are working on WordPress project (upload folder)

here is a sample .gitignore file for you:

### WordPress ###
wp-content/uploads/

## Or simply uploads folder
uploads/
CodeWizard
  • 128,036
  • 21
  • 144
  • 167