---
# System prepended metadata

title: Daily Git Workflow

---

# Daily Git Workflow

A formula for change management without unnecessary merge commits.

## Start of day

```shell
git checkout master           # Ensure you are on master
git fetch                     # Sync your local index with the latest remote changes
git pull --rebase --autostash # Pull down the latest remote changes down to the local branch
git checkout CX-XXXX-feature  # Checkout your feature branch
git pull --rebase --autostash # Pull down the latest remote changes down to the local branch
git rebase origin/master      # Put your feature branch changes on top of the latest master changes
git push --force-with-lease   # Forcefully, but safely, update remote with your locally rebased branch
```

## Midday

Make changes. Rinse. Repeat. Go ahead, 🚀 [use emojis in your commit messages][emoji-commits].

```shell
git add .
git commit -m "CX-XXXX | ✨ Add new functionality"
```

## End of day

Push local changes to remote.

```shell
git push
```

_NOTE: In general, **you should avoid force push** (`git push --force`). It is almost always better to have an extra commit than rewrite history._

[emoji-commits]:https://dev.to/n8io/cave-drawings-emojis-and-commit-messages-39ig