Skip to content

Instantly share code, notes, and snippets.

Git command cheat sheet

Git is the perfect source control for my home projects. It is free, works on mac, linux and windows, makes it easy to share code through github and takes me out of my Microsoft technology comfort zone. Here are the basic commands I need to be productive.

Basics

Adding all changed files in the current directory to the commit:

git add .

Adding any deleted files in the current directory to the commit:

When using AWS SAM it is possible to call your local lambdas using the AWS SDK, just as you would lambdas running in AWS. I found this very useful when building acceptance tests that would work on local as well as against our AWS staging environment.

To do it, just run sam local as a service on a specific port:

sam local start-lambda -p 8035

Then you can run your code which calls the lambda.