Reputation: 53
I am working on a website locally.
I turned the folder containing its files into a repository with a working tree.
Afterwards, I push the changes to a bare "remote" repository which is also just a folder in the local disk.
I created a post-receive
hook in the "remote" repository which checkouts to a certain local folder which simulates the web root in a server every time I push into the bare repository.
However, because I have a .gitignore
file in the working tree, it is also checked out to what's supposed to be the "live" website.
How do I exclude the .gitignore
file during checkout?
Any other tips are welcome.
Upvotes: 1
Views: 152
Reputation: 1328992
Your post-receive
hook is a script; it can amended to include additional step:
.gitignore
in said local folderThat way, you always end up with the latest content, without the unwanted .gitignore
file.
Upvotes: 1