-1

Every time I push this repository I feel that it imports too many objects:

mike@mike-thinks:~/Programing/Rasa/myflaskapp$ git push heroku master
Counting objects: 31708, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (23964/23964), ...

It has 31708 obects when I think I wrote at most a fifty. However, I had an idea that everything that was not necessary:

Here is the .gitignore:

# Environment
MyFlaskAppEnv/*
MyFlaskAppEnv/

# Under Construction
run_app.py
run_rasa_server.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# Distribution / packaging
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

So where do these objects come from ?

Adil B
  • 14,635
  • 11
  • 60
  • 78
Alice Antoine
  • 411
  • 6
  • 17

1 Answers1

2

Read this article on Git Objects - Git basically tracks all file diffs, commits, and file groupings as separate objects in order to understand the state of your repository and the synchronization steps it needs to apply when merging or pushing one repository branch to another.

Each object doesn't necessarily correspond 1:1 to a single file - depending on the steps you took on your local branch, Git may store several file objects, tree objects, and commit objects for each operation you performed.

Here's another good reference answer.

Adil B
  • 14,635
  • 11
  • 60
  • 78
  • Thanks for your answer. So each time I do `git add .` I create kind of file diffs, commits, and file groupings ? That seems so much, sometimes I only modify a line – Alice Antoine Jun 25 '18 at 18:59
  • Yes, that's the way Git is built - all of the `objects` it generates helps it keep track of all the operations and changes you do in your commits. – Adil B Jun 25 '18 at 19:20