Skip to content

GitHub repo maintainer howto

Nethesis developers edited this page May 4, 2018 · 1 revision

[This is an excerpt of an online chat with Stéphane de Labrusse on 2018-02-08]

As you've seen you have write access to nethserver-mail repo.

There are some recommendations:

  • Direct pushes to master should be avoided
  • PRs are better

If you're asked to review, approve when you think it can be merged, otherwise:

  • reject if something must be changed
  • comment to ask if in doubt

If the PR requester has write access too, leave the merge operation to him: he's responsible for that

Let's keep the git log short ... but not too short!

When merging a PR there are two options:

  • merge commit
  • squash & commit

Squash is good if PR has just one commit, or can be reasonably reduced to just one commit (i.e. commits that fix the fix of the fix...). Squash is automatically rebased on master by GitHub

Merge is good if the PR has more than one relevant comment, that help to understand the changes. Merge should be rebased manually by the PR author.

git rebase master
git push -f stephdl

I always have two remotes configured on git

[davidep@davidep1 nethserver-mail]$ git remote -v
davidep    [email protected]:DavidePrincipi/nethserver-mail.git (fetch)
davidep    [email protected]:DavidePrincipi/nethserver-mail.git (push)
origin    [email protected]:NethServer/nethserver-mail.git (fetch)
origin    [email protected]:NethServer/nethserver-mail.git (push)

Everything works fine by pushing to davidep, opening PR then merge on origin

git fetch --all

This is one of my favorite shell alias to understand what's going on:

alias gitgraph='git log --pretty=oneline --graph --all'
Clone this wiki locally