kawamanza / step-up

StepUp is an utility that helps other projects to manage your versioning increase.
80 stars 10 forks source link

Edit note #33

Open manuelbertelli opened 13 years ago

manuelbertelli commented 13 years ago

I'd like to edit an existing note. Nowadays we can't do that.

Suggested command: stepup notes edit

Suggested internal flow: 1) Open default editor with the message of the note 2) When user closes the editor, remove the old note and add a new one with the new content.

dgmike commented 9 years ago

Editing manually:

$ stepup notes --with-commit
---
Changes:

  - Adding number in address as independent field (2d8c14e4b0a3791d8708b6e16516252211da744d)

Bugfixes:

  - System broken when not start with environment (362cf8c8c856196d0010a8e01a79326336fa4037)

$ git notes --ref=changes show 2d8c14e4b0a3791d8708b6e16516252211da744d
Adding number in address as independent field

$ git notes --ref=changes edit 2d8c14e4b0a3791d8708b6e16516252211da744d

$ git push origin refs/notes/*

Not the best way, but solves for me....

dgmike commented 9 years ago

refs #19

kawamanza commented 9 years ago

After edit you must run git push origin refs/notes/* to avoid problems with concurrent notes of another commiter.

dgmike commented 9 years ago

Comment edited for future reviews :smile:

Thanks @kawamanza

dgmike commented 6 years ago

Recentely I discover there's a way to create stepup notes, using the commit message and prefix listed on .stepuprc file.

So... take a look.

# .stepuprc
  sections:
    - name: "changes"
      prefix: "change: " # this is the magical prefix
      label: "Changes:"
      tag: "change"

And here is the commit message:

git commit -m "change: create users requires age attribute"

stepup uses commit messages and ref notes to rescue versioning notes.

$ stepup notes
---
Changes:

  - create users requires age attribute

This is a great way to create version notes. And is extremely easy to edit notes... above some examples...

$ git commit --amend
$ git rebase -i HEAD~5

Ammend documentation: https://git-scm.com/docs/git-commit#git-commit---amend Rebase documentation: https://git-scm.com/docs/git-rebase Git Tools - Rewriting History: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History