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?
Asked
Active
Viewed 332 times
0

RC_02
- 3,146
- 1
- 18
- 20
1 Answers
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.

Rodrigo Murillo
- 13,080
- 2
- 29
- 50
-
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 – RC_02 Jun 14 '16 at 18:09
-
1Yes 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. – Rodrigo Murillo Jun 14 '16 at 18:13