eSaude Developer Tips & Tricks
Various hints to make life as an eSaude developer easier.

Avatar

Many services (such as GitHub) use Gravatar to display user profile pictures. Sign up there and add your various email address to get an avatar automatically on many sites.

GitHub

GitHub provides a number of useful keyboard shortcuts. Some useful ones are:

  • t - press t when browsing a repo (not a commit or diff) to activate the file finder, which lets you search for any file by name. 

Git

Merge remote changes locally without having a merge commit in the git history:

  • git pull --rebase origin master

Make a change to a commit (before you’ve pushed):

  • git add /path/to/file
  • git commit --amend

Include --no-edit to keep the same commit message.

Create a new branch that includes the changes you’ve already made:

  • git checkout -b new-branch-name

List local tags:

  • git tag -l

Creating and pushing a tag:

  • git tag 1.2.3
  • git push --tags

Deleting a tag and removing it from GitHub:

  • git tag -d 1.2.3
  • git push origin :refs/tags/1.2.3

Force your local repo to be exactly like remote:

  • git fetch origin
  • get reset --hard origin/master

Docker

Also see this great cheat sheet.

List running containers:

  • docker ps

Include -a to show stopped containers.