Skip to content

Instantly share code, notes, and snippets.

@espozbob
Last active December 10, 2018 06:32
Show Gist options
  • Save espozbob/034607536ab8f671372a362630fa359a to your computer and use it in GitHub Desktop.
Save espozbob/034607536ab8f671372a362630fa359a to your computer and use it in GitHub Desktop.
AWS CodeCommit - User Guide

AWS CodeCommit

Git

Store Git Credential

  • Go to AWS IAM and download a Git credential file.
$ git config --global credential.helper store
$ git fetch
Username for 'repo': xxx
Password for 'repo': 1234
$ less ~/.git-credentials 
https://xxx:1234@repo

Clone into a non-empty directory

git init
git remote add origin PATH/TO/REPO
git fetch
git reset origin/master  # this is required if files in the non-empty directory are in the repo
git checkout -t origin/master

Git ignore

$ touch ~/.gitignore
$ git config --global core.excludesFile ~/.gitignore

Reset git repository

$ cd <repository>
$ rm -rf .git

Cleaning Ignored Files

$ git rm -r --cached .
$ git add .
$ git commit -m "Clean up ignored files"

CLI Command

Get Differences

  • afterCommitSpecifier : HEAD, branch, tag, id
$ aws codecommit get-differences --repository-name OfficeBot --after-commit-specifier master --query differences[*].afterBlob.path
@espozbob
Copy link
Author

MacOS Setting

git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true

이후 아래 링크 점검

https://docs.aws.amazon.com/ko_kr/codecommit/latest/userguide/troubleshooting-ch.html#troubleshooting-macoshttps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment