0% found this document useful (0 votes)
132 views

#1 Learn-by-Doing Multicloud Training Platform

This document provides a cheat sheet for using AWS CodeCommit, summarizing common Git commands for working with CodeCommit repositories. It outlines commands for setting up connections between local and remote repositories, pushing and pulling changes, viewing commit histories, managing branches and tags, and more. The document encourages learners to take an AWS DevOps Professional Certification course to gain deeper knowledge of AWS Developer Tools beyond what the cheat sheet covers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views

#1 Learn-by-Doing Multicloud Training Platform

This document provides a cheat sheet for using AWS CodeCommit, summarizing common Git commands for working with CodeCommit repositories. It outlines commands for setting up connections between local and remote repositories, pushing and pulling changes, viewing commit histories, managing branches and tags, and more. The document encourages learners to take an AWS DevOps Professional Certification course to gain deeper knowledge of AWS Developer Tools beyond what the cheat sheet covers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

AWS CodeCommit Cheat Sheet

Pushes finalized commits from the local repo to the CodeCommit


Lists all configuration variables repository, using the specified nickname the local repo has for the
CodeCommit repository and the specified branch

git config --list git push -u remote-namebranch-name

Pushes finalized commits from the local repo to the CodeCommit


Lists all local configuration variables
repository after upstream tracking information is set

git config --local -l git push

Pulls finalized commits to the local repo from the CodeCommit


Lists system configuration variables repository, using the specified nickname the local repo has for the
CodeCommit repository and the specified branch

git config --system -l git pull remote-namebranch-name

CommitsShows what has or hasn’t been added to


Lists Global configuration variables
the pending commit in the local repo

git config --global -l git status

Remote Repositories Initializes a local repo in preparation for Shows changes between the pending commit and the latest
connecting it to a CodeCommit repository commit in the local repo

git init git diff HEAD

Can be used to set up a connection between a local repo and a remote repository: Adds specific files to the pending commit in the local repo

git remote add remote-nameremote-url git add [file-name-1 file-name-2 file-name-N| file-pattern]

Creates a local repo by making a copy of a CodeCommit repository at the Adds all new, modified, and deleted files to the
specified URL, in the specified subfolder of the current folder on the local machine pending commit in the local repo

git clone remote-urllocal-subfolder-name git add

It begins finalizing the pending commit in the local repo, which displays
Shows the nickname the local repo uses for
an editor to provide a commit message. The pending commit
the CodeCommit repository
finalizes after the message is entered

git remote git commit

Shows the nickname and the URL the local repo uses for
Lists recent commits in the local repo
fetches and pushes to the CodeCommit repository

git remote -v git log

BranchesLists all branches in the local repo with an asterisk (*) Merges changes from another branch in the local
displayed next to your current branch repo to the current branch in the local repo

git branch git merge from-other-branch-name

#1 Learn-by-Doing Multicloud Training Platform


AWS CodeCommit Cheat Sheet

Pulls information about all existing branches in the Deletes a branch in the local repo (unless it
CodeCommit repository to the local repo contains un-merged work)

git fetch git branch -d branch-name

Lists all branches in the local repo and remote Deletes a branch in the CodeCommit repository using the specified nickname the
tracking branches in the local repo local repo has for the CodeCommit repository and the specified branch name

git branch -a git push remote-name :branch-name

Lists only remote tracking branches in the local repo


TagsLists all tags in the local repo
Learn more about branching out with Git here

git branch -r git tag

Creates a new branch in the local repo using the specified branch name Pulls all tags from the CodeCommit repository to the local repo

git branch new-branch-name git fetch --tags

Switches to another branch in the local repo using the specified branch name Shows information about a specific tag in the local repo

git checkout other-branch-name git show tag-name

Pushes a specific tag from the local repo to the CodeCommit repository
Creates a new branch in the local repo using the specified using the specified nickname the local repo has for the CodeCommit
branch name, and then switches to it repository and the specified tag name
Learn more about version control with Git here

git checkout -b new-branch-name git push remote-name tag-name

Pushes a new branch from the local repo to the CodeCommit


Pushes all tags from the local repo to the CodeCommit repository using the
repository using the specified nickname the local repo has for the
specified nickname the local repo has for the CodeCommit repository
CodeCommit repository and the specified branch name

git push -u remote-name new-branch-name git push remote-name --tags

Creates a new branch in the local repo using the specified branch name. And then connects the new branch in the local repo to an existing branch in the CodeCommit
repository, using the specified nickname the local repo has for the CodeCommit repository and the specified branch name

git branch --track new-branch-nameremote-name/remote-branch-name

To Summarize

This deep dive into CodeCommit acts as a cheat sheet for you to use. But there is still a lot of ground to cover
in AWS Developer Tools, so check out this AWS DevOps Professional Certification course for more on the
Developer Tools suite.

#1 Learn-by-Doing Multicloud Training Platform

You might also like