Reputation: 879
If I am using only the git commands to access a remote git repository, is there any possibility where I might accidentally corrupt it.
For e.g. in a local repository case, accidentally running a find and replace command, can change the contents of .git directory and corrupt the GIT use. Now that woudl not be possible for a remote one.
Another case if I did some rollback or other such combination of operations.
Can get to a situation with a remote repository where I could not undo some of the bad effects of a insane operation performed if possible first of all.
Upvotes: 0
Views: 339
Reputation: 265727
Leaving disk failure aside: no, it's not possible to corrupt a remote git repository through git commands. It's not even possible to corrupt a local git repository through git commands only – search & replace sure ain't no git command.
You can however lose commits, by running git reset --hard, expiring the reflog and then pruning and garbage collecting the repository. But then again, this is not a corrupt git repository … it simply misses the data you removed from it …
Upvotes: 1