If I just want to send a whole source directory as a tar-ball to somebody, can I include the .git or is there any personal information in there?
The perfect scenario would be for the other person to unpack the directory and start there own fork, so to speak, without any trace of me as a former "owner" except for my name in the commits. Is that possible?
Looking at the content of the .git/
directories, it contains all information needed to keep track of changes on the repo, which is useful for the person you are leaving a copy for, either for logs and commits that occurred before, so in short there are no personal information.
Although there is the case that @HBHB and @tarleb mentioned, which is configuring your username locally per repo, which leaves this info in your .git/config
file as show below:
[core]
repositoryformatversion = 0
fileMode = false
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "development"]
remote = origin
merge = refs/heads/development
[user]
email = {[email protected]}
@RabeeAbdelWahab covers it pretty well above. Just to be a bit more specific: The .git
directory contains info like
.git/info/exclude
).It's usually not super sensitive information, but one might want to think twice about whether it's a good idea to sent that to somebody else.
As an alternative, I'd suggest to clone the repo into a new directory, alter the settings you wanted to preserve and send that new repo instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With