Reputation: 5844
I searched for an answer to this, but I just found other stuff related to .gitignore
.
I have a demo
folder in my repo for a demonstration of my package. When I push, I want it to be uploaded just because I want it stored and updated along with the package.
However, when someone clones the repo, I don't want them to have the demo
, because they don't need it. They only need the files in lib
to use the package.
I tried adding demo
to my .gitignore
, git add . -f
and then pushing. The demo
was uploaded. However, when I git clone
the repo in another folder, the demo files are still downloaded.
Upvotes: 2
Views: 720
Reputation: 21
git commit what them (don't push), then git pull:
git add -A
to makesure they're will not changedgit commit -m "your message"
, after that don't pushgit pull
Upvotes: 0
Reputation: 38724
This is not possible. Either demo
is part of the repo or not. .gitignore
is only effective on untracked files. As soon as a file is tracked, .gitignore
is not taken into consideration.
Upvotes: 2