Index by title

Common git operations

Prerequisites:

cd ~/plugins/issue_recurring

Issue/pull request resolution in separate branch

Create separate branch for issue

  1. Checkout and update master:
    $ git checkout master
    $ git pull
    
  2. Create, checkout new branch and push it to remote (so it will be tracked and replicated on it.michalczyk.pro):
    $ git checkout -b issueN
    $ git push -u origin issueN
    
  3. Reload all files open in vim:
    :bufdo! e
    

Checkout pull request locally (for editing, testing etc.)

Github docs

  1. Fetch pull request based on its number into new branch and switch to new branch:
    $ git fetch origin pull/N/head:prN
    $ git checkout prN
    
  2. (optionally) Push newly created branch:
    git push -u origin prN
    

Merge issue/pull request branch into master

  1. Push uncommited changes on issue branch.
  2. Checkout and update master:
    $ git checkout master
    $ git pull
    
  3. Merge adding comment closes #N (for issue branch), optionally view commits and push issueN/prN branch:
    $ git merge issueN
    $ git log origin/master..HEAD
    $ git push
    
  4. Delete merged branch from local and remote:
    $ git branch -d issueN
    $ git push origin :issueN
    
  5. Verify:
    $ git branch -a
    

Release

Move tag to different commit (e.g. after fixing some mistake)

  1. Remove tag from remote (if it has been pushed):
    git push origin :refs/tags/1.3
    
  2. Force replacement of existing tag with one referencing most recent commit:
    git tag -fa 1.3
    
  3. Push:
    git push origin 1.3
    

Other

Change remote URL from HTTPS to SSH (required by Github's no-password policy)

  1. Check current URL:
    git remote -v
    
  2. Change to SSH:
    git remote set-url origin git@github.com:cryptogopher/issue_recurring.git
    

Preparing new release

  1. Sync locale strings across language files (add test to check for differences? or execute system tests in different locales?).
  2. Make sure all tests pass on each merged issue branch, on all supported Redmine versions:
    1. Start in Redmine's directory:
      cd /var/lib/redmine
      
    2. (only before 1st run) prepare database (load default data separately, https://www.redmine.org/boards/2/topics/48044):
      RAILS_ENV=test bundle exec rake db:drop db:create db:migrate
      RAILS_ENV=test bundle exec rake redmine:plugins:migrate NAME=issue_recurring
      RAILS_ENV=test bundle exec rake redmine:load_default_data
      
    3. run tests (migration tests run separately as they are not run within transaction and can leave db in unspecified state when failing):
      RAILS_ENV=test bundle exec rake redmine:plugins:test NAME=issue_recurring
      RAILS_ENV=test bundle exec rake redmine:plugins:test:migration NAME=issue_recurring
      
    4. (optionally) rerun failing tests separately:
      RAILS_ENV=test bundle exec ruby plugins/issue_recurring/test/integration/issue_recurrences_test.rb --name test_create_recurrence --verbose
      
  3. Merge all outstanding branches into master.
  4. Rerun above tests on master branch if there were:
    1. multiple branches merged,
    2. conflicts during merge.
  5. Update source:CHANGELOG.md and source:README.md: Features and compatibility list in Installation paragraphs.
  6. Bump plugin version number in source:init.rb.
  7. Commit and push changes.
  8. Create and push git tag with new version number:
    $ git tag -a 1.1
    $ git push origin 1.1
    
  9. Close corresponding issues (if not closed by appropriate commit messages).
  10. Update plugin information on https://redmine.org/plugins/issue-recurring
  11. Add release news on IT https://it.michalczyk.pro/projects/issue-recurring/news
  12. Add new version on IT https://it.michalczyk.pro/projects/issue-recurring/settings/versions

Screenshots

Issue view

issue-recurrence-issue-view.png

Issue recurrences project tab

issue-recurrences-project-tab.png

Plugin settings view

settings.png


Wiki

Installation guide: source:README.md (or Github)

Screenshots

Coding guidelines

Common git operations
Preparing new release