0

I have setup AWS Code Deploy with my github project. Deployment works without fail. When I login to EC2 instance, I see my project folder and all the files, but don't see the project as a git repository.
I can run git init and it will be git repo, but when I push the latest commit for the second time using code deploy, I will not have the recent git commit history. Is there a way this can be done?

1 Answer 1

2

CodeDeploy will only deploy the files, not the entire GIT repository itself.

This is intentional. You would not normally want the repository itself on a server, you would only want the files.

Code development, commits, etc are done on a different server, not on the server you deploy to.

Sign up to request clarification or add additional context in comments.

2 Comments

The reason I wanted it to be a git repository on server is because we use git submodules quite a bit. So after the files are copied over from github, I need to run git submodule update which will update submodules defined in .gitmodules file
Yes I understand. CodeDeploy will not do this. An option would be to build the project via Jenkins, and then upload that to S3 and do and S3 based CodeDeploy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.