If you need to remove files from a repo after committing, use …
Remove file
git rm --cached file.ext |
Push to repo
git push |
cloud engineer
If you need to remove files from a repo after committing, use …
Remove file
git rm --cached file.ext |
git rm --cached file.ext
Push to repo
git push |
git push
Here’s a couple of steps to move a Docker image to the Google Container Registry.
Create a container image.
docker build -t gcr.io/${PROJECT_ID}/my-app:v1 . |
docker build -t gcr.io/${PROJECT_ID}/my-app:v1 .
Push image to GCR.
docker push gcr.io/[PROJECT-ID]/[IMAGE] |
docker push gcr.io/[PROJECT-ID]/[IMAGE]
Amazon Elastic Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images.
Here’s the AWS IAM policy to push and pull images from Docker within ECR.
{ "Version": "2008-10-17", "Statement": [ { "Sid": "AllowPushPull", "Effect": "Allow", "Resource": [ "arn:aws:iam::*:role/your-custom-role" ], "Action": [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability", "ecr:PutImage", "ecr:InitiateLayerUpload", "ecr:UploadLayerPart", "ecr:CompleteLayerUpload" ] } ] } |
{ "Version": "2008-10-17", "Statement": [ { "Sid": "AllowPushPull", "Effect": "Allow", "Resource": [ "arn:aws:iam::*:role/your-custom-role" ], "Action": [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability", "ecr:PutImage", "ecr:InitiateLayerUpload", "ecr:UploadLayerPart", "ecr:CompleteLayerUpload" ] } ] }
The Git Push command sends all commits found in the local repository to the remote or master repository on the web such as Github or Unfuddle, as an example. You can invoke the Git Push command from the Terminal by typing the following:
git push |
git push
In addition, you can be more specific by typing the following:
git push origin master |
git push origin master