Vacassal Alsk
Vacassal Alsk

Reputation: 513

How do we git push without some files?

This is supposed to be a simple problem but i could not find solution anywhere. Basically, I have a github large file system. I make a branch with git branch, edit something, did not touch any of the large files. For some reason, when I git add -A, git commit,git push origin branchname, it tries to upload all the large files! This is insane. Is there a way to git push without certain files?

Upvotes: 1

Views: 2941

Answers (1)

Leticia
Leticia

Reputation: 76

You should specify all the files you don't want to push in .gitignore.

In the .gitignore file, you just have to list the files with the patterns seen in here: https://git-scm.com/docs/gitignore.

ps: just be careful if you someday decide you actually want to push those files.

Upvotes: 1

Related Questions