Using AWS Code Commit
Making sure the AWS CLI is proper installed in the computer
$ aws sts get-caller-identityIt should show your account information
{
"Account": "123456789012",
"UserId": "AKIAIOSFODNN7EXAMPLE",
"Arn": "arn:aws:iam::123456789012:user/Alice"
}Ensure CodeCommit is installed
$ aws codecommit helpSetting up your CodeCommit repository
Create CodeCommit repository
$ aws codecommit create-repository --repository-name <repository name>Initialize a new git repository
$ git initAdd your CodeCommit repository as a remote
$ git remote add origin codecommit://<repository name>After all the configuration is done you can run the common Git commands like Push the code to your new CodeCommit repository
$ git push -u origin master