Reputation: 1733
Say, If I have a git repo established in the repository ssh://[email protected]:port/home/user/public_html/,
and I'd like to clone it in my local project's directory, would the appended items in my remote host's .gitignore
be included in the cloning of my public_html/.git
repository?
local$ git clone ssh://[email protected]:port/home/user/public_html/
Upvotes: 0
Views: 113
Reputation: 3150
The sole purpose of the .gitignore
files is to ensure that untracked files remain untracked. The moment a file is tracked, for example when you intentionally did
git add --force path/to/ignored-file
that moment the .gitignore
file lost its might over that file. So, if your remote repository contains a file that is listed in the .gitignore
file, that file will still remain there in the remote repository, as well as in your clone.
Upvotes: 1