I'm trying to setup an environment that clones a github project into a gitlab repo directory and overwrites it with the files that exist in that gitlab repo.
A couple questions:
- Is there a better approach than cloning and moving files around? (Perhaps this changes the approach - I only want to track changes to the files that already exist in the gitlab repo)
- Assuming cloning and moving is a good approach, currently it does the opposite in the script below (takes the github clone and moves it into the gitlab repo directory, while I need it to move the existing gitlab files on top of the clone). What would be the correct way to reverse this script?
git clone https://github.com/github_project/github_project.git /github_clone
mv /github_clone /gitlab_app
rm -rf /github_clone