Delete fix_errors.sh

This commit is contained in:
Ronaldson Bellande 2023-09-27 23:45:25 -04:00 committed by GitHub
parent d4a8140308
commit 1fe7703184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,31 +0,0 @@
#!/bin/bash
# Get the URL from .git/config
git_url=$(git config --get remote.origin.url)
# Check if a URL is found
if [ -z "$git_url" ]; then
echo "No remote URL found in .git/config."
exit 1
fi
# Clone the repository into a temporary folder
git clone "$git_url" tmp_clone
# Check if the clone was successful
if [ $? -eq 0 ]; then
# Remove the existing .git directory if it exists
if [ -d ".git" ]; then
rm -rf .git
fi
# Copy the .git directory from the clone to the current repository
cp -r tmp_clone/.git .
# Remove the clone directory
rm -rf tmp_clone
echo "Repository cloned and .git directory copied successfully."
else
echo "Failed to clone the repository."
fi