In this express guide I will explain contributor etiquette so that you can become a contributor to a git repository.

As you should know, if you are reading this post, git is a versioning system primarily used for code, so that people building software can easily track what has changed accross updates. If you don’t this is not the post for you. I recommend you start on Baeldung’s Git Guide for Begginers.

You should already know how to do the following:

This post if for people who are already working with others using git tracked content, and would like to get up-to-speed fast with contribution etiquette, so that you understand how to submit changes in a way your peers will understand.

Branches, Commits, and Pull Requests in a nutshell

To follow this post I am assuming you already have cloned your repository to your local computer using git clone <url>1 and you navigate to it using the command line and by opening your code editor from it (ex: navigate to the folder on the terminal and use code . if using VS Code or whichever the command for your code editor).

So might think you can just do some changes and submit them, but that is the equivalent of putting your favorite spices on the communal soup pot without asking and expecting everyone will be happy about it. This is where developer etiquette comes in. I’ll give you a brief about Git Flow, a contribution etiquette guide that most developers are familiar with.

Let’s talk branches

You might be familiar that the default branch to your remote github repository is called main, and you may also be familiar to development branch. Main is what’s live, and the latest version, and development is what we are working on. But that doesn’t mean we should push our work directly to development, since that’s the communal soup, and teams normally want to taste it first before applying your changes to it. So how do you order work? with a branch. Now let’s say I just name a branch with my name, so people know it’s mine:

git checkout -b ali

This creates a new branch named ali, and moves your git pointer to that branch.

Now naming the branch your name might seem like a good idea in principle, but branches have etiquette for names too. Let’s teleport to the future when I’m no longer on that project, someone will check the git history through git log and see the branch ali was merged to development, and they will see the changes, but no context to them. On a long-lived project, context is everything. You need to provide contributors of the future with enough information to understand why a change was introduced. There are several ways to do this.

In Git Flow, naming a branch after the work being done is a practice that helps the project be kept legible for the future. Git flow has these conventions for the branch name:

  • main and development are the production-ready and next-version-in-progress branches
  • feature/<name_of_feature> or feat/<name_of_feature> is for work pertaining a certain featue you are building. For example feat/adding_bearer_credentials.
  • bug/<name_of_bug> or even fix/<name_of_fix> is for things that are not new features but rather corrections from feedback people have submitted.
  • hotfix/<name_of_fix> is for things that need to be immediately merged to production, mostly because there is a security issue or any other urgent matter. These are to be used sparsely and often require coordination with whoemver is deploying to production.
  • release/vX.X.X normally used by whoemver is maintaining the project to control the versioning and releasing process.

So use a name that is descriptive of the work you are doing, and use the right category to denote it, so that people from the present and the future know what you are up to.

Now let’s talk about commits

You might think now that your must create a branch for every single change you do, but developing a feature implies quite a bit of work and it might take you weeks with several changes you migh want to save back to. This is were commits come handy. Think of commits as checkpoints you can save back to, and as a useful log of how your work is changing. I might open a branch to start some work, commit to it, show it to my colleagues, they will provide feedback, so I make more changes and commit them to the same branch.

The branch should talk about the larger work you are doing and the commit should talk about the day to day changes you are doing. You commit as many times as you need to the same branch, so that that branch is ready for discussion and review by the rest of your team. Use git log to see the history of commits in your branch, and git show <commit_hash>2 to view the changes that that commit brought to the codebase.

Commit messages

This section is optional, but nice. For the longest time I used to write one-line commit messages: git commit -m "changed X thing" allows you to do this. Its quick and brings up a legible git log. However, when I viewed repos from more senior developers they would write longer and more informative commit messages, and now that I co-write mine with AI it seems to have that as a standard practice. Oftentimes I don’t bother writing a detailed commit, as most of the change explanations go right into my Pull Request (of which we’ll talk in a bit), but if you are able to provide better explanations, I do recommend larger messages, they provide nice context on the git log allowing developers to see what you meant directly on the git history of the local repository without resorting to checking the website where it is hosted. Commit messages survive a change from remote repositories, Pull Requests might not.

$ git log
commit 3e7bb2b2ff2bfd947524210aeaa40db5967e5e82 (origin/fix/conformance_profiles_folder_re-structuring)
Merge: 952312d 2819134
Author: Ali G <ali@basicavisual.io>
Date:   Tue Dec 1 20:18:33 2026 +0100

    Merge branch 'development' into fix/conformance_profiles_folder_re-structuring

commit 952312d8ed95bef9561b6ac601058d41f9749229
Author: Ali G. <ali@basicavisual.io>
Date:   Tue Dec 1 20:15:27 2026 +0100

    Organise functionalities into modules/core and modules/extensions
    
    Applies the Architecture Working Group call of 2026-11-25 and the follow-up discussion in #architecture.
    
    - Replace requirements/ with modules/: modules/core/ and one folder per extension in modules/extensions/<id>/, each with an introduction.md and a functionalities/ folder.
    - Keep the conformance and extension fields on functionality files. They must agree with the folder the file sits in, or the specification fails to compile.
    - Drop the extensions block from metadata.yml. Each extension is declared in the front matter of its introduction.md, with an id in kebab-case equal to its folder name, and a status with the ARCH-ADR-5 lifecycle. Only a PUBLISHED extension can be claimed. The core has no id and no status.
    - Define how extension and requirement statuses combine, including published requirements moved into an unpublished extension, and the release types of publishing, deprecating and reinstating an extension.
    - Record the decision in ARCH-ADR-7, split its compiler checks into errors and warnings, and remove the citation of the unpublished Payments ADR. Align ARCH-TDR-1.
    - Update Structure of Specifications, Introductory Chapters, Requirements, the preparatory work and the Wallet example for the new layout. Add core
, extension, core functionality, extension functionality, module and conformance declaration to the terminology.
    
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Submitting a Pull Request

A Pull Request (or Merge Request, if you are using Gitlab) is a request to merge your changes into another branch on the remote repository. A PR allows other developers to view the changes you are proposing and comment on them, review them, suggest changes or approve them before merging them to another branch.

Pull Requests are submitted against a specific branch. Often the development branch, since that is the communal soup we are preparing. Let’s make this an creative exercise, where I am tasked to give it an spicy flavor to the communal soup. My repository is called soup. The main branch, contains the recipe we are already making. The development branch is the project for the new recipe everyone is working on. Let’s say this is a cajun-style soup, so besides spicy it needs to be smokey and other flavor profiles, but I was tasked only with making it spicy, so I open a spicy branch:

git checkout -b feat/spicy

I make my changes and add the new ingredients (let’s pretend ingredients are held on files):

git add red_serrano_pepper.md cayenne_pepper.md

Now we prepare our commit:

git commit -m "upped spicy level"

Here’s how my commit looks on git show:

$ git log
    upped spicy level

diff --git a/cayenne_pepper.md b/cayenne_pepper.md
index 159a3f4..e3240df 100644
--- a/cayenne_pepper.md
+++ b/cayenne_pepper.md
@@ -1 +1 @@
-2 tablespoons
+2 1/2 tablespoons
diff --git a/red_serrano_pepper.md b/red_serrano_pepper.md
index bbe3690..71550d7 100644
--- a/red_serrano_pepper.md
+++ b/red_serrano_pepper.md
@@ -1 +1 @@
-2 chillies
+3 chillies

If I git push here’s what I see on my console:

git push origin feat/spicy
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (7/7), 601 bytes | 601.00 KiB/s, done.
Total 7 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
remote: 
remote: Create a pull request for 'feat/spicy' on GitHub by visiting:
remote:      https://github.com/basicavisual/soup/pull/new/feat/spicy
remote: 
To github.com:basicavisual/soup.git
 * [new branch]      feat/spicy -> feat/spicy
branch 'feat/spicy' set up to track 'origin/feat/spicy'.

At that moment, I should go ahead and click the link to open a PR, or go to the repository on the web and click on the Pull request window. Here’s the instructions for Github and for Gitlab.

In it, the git portal will ask me against which branch am I merging. I should choose the branch I initially branched off from (and unless you are making hotfixes, you should default to development.)

Within the Pull Request it is customary to write down What am I changing, and my motivations to introduce this change. Depending on the repository you are working on, the community will have more or less conventions on Pull Requests. Here’s one of my own you can consult.

Colleagues in the project will at that moment view exactly what am I changing, and are able to comment on the main thread, or on individual code lines from my proposed changes.

I can then use this feedback to introduce new changes to my Pull Request. I go back to my code, commit on the same branch, and push my changes, and my teammates will be able to see the changed code.

In this way, my teammates will see how I changed the my work after addressing their feedback, and it’s all there to see transparently.

Some no-no’s

Just as commiting directly to development is a big no-no in contribution etiquette there are other things you should not do. I’ll append them here as I come accross them.

1. Introducing unrelated changes to the same branch

If I’m tasked with making the soup spicy, but I also addressed something else, like a typo, or an unrelated task, it is looked down upon to put these on the same branch. The reason why is that people want to only review your spicy changes on the spicy branch, and unrelated changes need to be either on a separate branch if they are big enough, or if small enough, like typos, it may be permissible to commit directly to development, since these don’t change the recipe and also don’t need to wait for other things to be approve before being merged.

2. Introducing too many changes on the same branch

Basically the same as above, but this is about proper task breakup. Let’s say you are tasked with making a website responsive. You may want to open a feature/responsive branch. But this often entails a lot of work, since you are changing several screens and each screen will contain a lot of changes. You want to make this iterative, so first start a feat/responsive branch, and then branch-off of it to start the first task git checkout -b feat/landing_page. Make sure git is currently pointing to feat/responsive otherwise you’ll start off an unrelated branch.

Work on the landing page and the Pull Request will be submitted against the feat/responsive branch. That way, you can iteratively be working on the responsive feaure, where you show your work little by little, versus waiting untill everything’s finished and tasking your team with reviewing 84 files.

Synching remote changes, cherry picking and fixing alignment errors

If you are working with git an remote repositories, other people are also working on the same code at the same time as you. More advanced git users will always keep in mind how the code branches on and off the trunk branches and where their current branch and commits are. But for new users I just recommend you keep your branches in sync. If anyone is working on the same branch as you, make sure you pull their changes, and also make it a custom to pull the latest changes from the trunk yu are working with, so for example:

$ git checkout main
Switched to branch 'main'
$ git pull origin main
From github.com:basicavisual/soup
 * branch            main       -> FETCH_HEAD
Already up to date.

In case of changes, git will download the latest changes.

Often times you may make errors due or people may have already changed a file you were working on. In this case I will recommend you the following tutorials:

  • Git Cherry-picking allows you to apply a specific commit from one branch onto another without merging the entire branch. This may be useful when let’s say you commited chnages to the wrong branch on accident and want to just retrieve your work on the correct branch.
  • Git merge vs fast-forward vs rebase - A visual guide explains what to do when someone has touched the file you were working on, or when you forgot to synch and need to decide how to reconcile the changes made.

Conclusion

I built this little guide to explain the etiquette beyond what a classic git tutorial will teach. This is etiquette I’ve learned thoughout many years collaborating with other developers in Open Source projects and I have found most developers and teams already intuitively know how to collaborate using these methods. I have recently found the opinion that Git flow (the convention behind naming branches and retaining work on one until it can be released) has “fallen out of fashion”, but I hav found this is specifically project-defined rather than a general statement, and because open-source project which is what I primarily contirbute to work in versions, Git flow seems the preferred way. Here’s an opinion piece about it I found helpful.

Notes

  1. Here are the instructions for cloning a repository on Github or Gitlab. I recommend using SSH instead of HTTPs, but it requires you register your key on either platform. Here are the Github and the Gitlab since it is safer and quicker in the long-run as it will authenticate you for all repos within either website. ↩ ↩2

  2. A commit hash is the unique identifier for a commit. It’s how git saves a snapshot of the changes. However the hash is not only an identifier, it is the result of a calculation of the metadata of the changes donde within the commit, which gives it a level of security and traceability that git is famoush for. More information here. ↩