-1

We recently started AWS and our local git is now hosted in AWS. I want to know how i can sync the code commits to a local gitlab where all the commits made will automatically come and sit in both code commits and my local repo.

Hoping for a good solution.

Thank you all.

1 Answers1

0

You can use a number of tools to set up an automated sync job. A cron job (Linux), a task in Windows Task Scheduler (Windows)

Following approaches rely on commands that pull the latest changes from the source repository to your local clone repo, and then mirror those changes to your AWS CodeCommit repository. They can be summed up as follows:

cd /path/to/your/local/repo git pull git push sync --mirror

Please refer to this AWS Blog Post.

Kush Vyas
  • 5,813
  • 2
  • 26
  • 36