Repeats

Rebase your feature branches

Regularly, but at least before merging your feature branches, rebase them to get rid of "fix typo" and "wip" commits.

Getting rid of unnecessary commits

Let's say you do a git rebase -i HEAD~~~~ and have this commit history:

pick 1d1e1f My Feature
pick 2d2e2f My Feature - wip
pick 3d3e3f My Feature - fix typo
pick 4d4e4f My Other feature

Change it to use fixup for those commits that should be merged into the one before ...

Repeats

How to run long scripts on production/staging server

In a nutshell, use screen

Why?
Sometimes we are concerned that if our connection gets closed, the process we are running will close too.

The processes or login sessions you establish through screen don't go away. You can resume your screen sessions.

How?

  1. run screen command
    screen
    or you can give that screen a name (will help afterwards)
    screen -S some_name

  2. run your time consuming command
    script/runner path_to_some_long_script.rb

  3. detatch from your screen with the following commands

  • `Crt...
This website uses short-lived cookies to improve usability.
Accept or learn more