From 14d6f407a5583f38ba68a0edac2659451e8eda3d Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Sat, 6 Mar 2021 21:48:54 +0100 Subject: [PATCH] chore: document useful git commands to avoid any DCO trouble Signed-off-by: Himanshu Mishra --- .github/PULL_REQUEST_TEMPLATE.md | 1 + .github/styles/vocab.txt | 1 + CONTRIBUTING.md | 6 ++++++ README.md | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d68af23491..402617b66d 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -11,3 +11,4 @@ - [ ] Added or updated documentation - [ ] Tests for new functionality and regression tests for bug fixes - [ ] Screenshots attached (for UI changes) +- [ ] All your commits have a `Signed-off-by` line in the message. ([more info](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md#developer-certificate-of-origin)) diff --git a/.github/styles/vocab.txt b/.github/styles/vocab.txt index fcc5d63d20..3593bd7bad 100644 --- a/.github/styles/vocab.txt +++ b/.github/styles/vocab.txt @@ -65,6 +65,7 @@ Protobuf Proxying Raghunandan Readme +rebase Recharts Redash Repo diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 56404b2c81..1b7433888c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -96,6 +96,12 @@ Awesome commit message Signed-off-by: Jane Smith jane.smith@example.com ``` +- In case you forgot to add it to the most recent commit, use `git commit --amend --signoff` +- In case you forgot to add it to the last N commits in your branch, use `git rebase --signoff HEAD~N` and replace N with the number of new commits you created in your branch. +- If you have a very deep branch with a lot of commits, run `git rebase -i --signoff $(git merge-base -a master HEAD)`, double check to make sense of the commits (keep all lines as `pick`) and save and close the editor. This should bulk sign all the commits in your PR. Do be careful though. If you have a complex flow with a lot of branching and re-merging of work branches and stuff, merge-base may not be the right solution for you. + +Note: If you have already pushed you branch to a remote, you might have to force push: `git push -f` after the rebase. + ## Creating Changesets We use [changesets](https://github.com/atlassian/changesets) to help us prepare releases. They help us make sure that every package affected by a change gets a proper version number and an entry in its `CHANGELOG.md`. To make the process of generating releases easy, it helps when contributors include changesets with their pull requests. diff --git a/README.md b/README.md index d01be3f54c..6dd490e43b 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Check out [the documentation](https://backstage.io/docs/getting-started) on how ## Community - [Discord chatroom](https://discord.gg/MUpMjP2) - Get support or discuss the project -- [Good First Issues](https://github.com/backstage/backstage/contribute) - Start here if you want to contribute +- [Contributing to Backstage](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md) - Start here if you want to contribute - [RFCs](https://github.com/backstage/backstage/labels/rfc) - Help shape the technical direction - [FAQ](https://backstage.io/docs/FAQ) - Frequently Asked Questions - [Code of Conduct](CODE_OF_CONDUCT.md) - This is how we roll