Git for Team Projects: A Sri Lanka Beginner Guide

Published · By App Dev Sri Lanka
Reading time: 4 min read
Editorial illustration: two Sri Lankan developers reviewing branching project cards and a code change on a shared monitor

Git teamwork is easier to learn through a small shared change than through memorising many commands. For a Sri Lankan student team or junior developer, a simple documentation improvement can teach branches, commits, review and conflict handling.

Practise in a repository you control or are authorised to use.

Start from a clear task

Choose one change, such as adding setup instructions to a README. Agree on what completion means before editing.

GitHub flow describes a lightweight process using a branch, commits, a pull request, review and merge. The exact team policy may differ, so follow the repository's contribution instructions.

Check the working tree before starting. Uncommitted work may belong to another task and should not be discarded casually.

Create a branch and inspect the change

In your practice repository, a small command sequence could be:

git status
git switch -c docs/setup-guide
git diff

Edit the intended file, then inspect the diff again. The branch name should describe the task, and the diff should contain only the change you mean to submit.

Step Question to ask
Before editing Is the working tree understood?
After editing Did only the intended content change?
Before committing Is the diff complete and readable?
Before review Can another person understand the purpose?

Do not use destructive reset or clean commands just to make the status look tidy.

Write a useful commit

Stage the specific file and review the staged diff:

git add README.md
git diff --cached
git commit -m "Document local setup steps"

Use a message that describes the change. Avoid bundling unrelated formatting, dependency updates and feature work into one beginner exercise.

Never commit credentials or private data. Review screenshots and example configuration files as carefully as code.

Open a readable pull request

Explain the problem, the change and how you checked it. For a documentation update, a useful check is following the instructions from a clean environment.

Ask for review through the team's normal process. Respond to comments by discussing the change, not defending the amount of effort you spent.

If feedback changes the scope, update the description so it matches the final result.

Resolve a simple conflict carefully

A conflict means Git needs a human decision about overlapping changes. Read both versions and understand the intended final content.

Do not automatically choose “ours” or “theirs” without inspecting what would be lost. After resolving the file, run the relevant check and inspect the complete diff.

If the conflict involves code you do not understand, ask the author or reviewer. Preserving behaviour matters more than making the conflict markers disappear quickly.

Finish and learn from the review

Merge only when the repository's review and validation requirements are satisfied. Keep the history understandable and follow the team's branch-cleanup convention.

Write down one lesson from the review, such as a missing setup prerequisite or a clearer explanation. The exercise should improve collaboration as well as command familiarity.

Do you need a team to practise?

You can create two branches in your own test repository and simulate overlapping changes. Keep the exercise separate from important work.

Is a large number of commits better?

Useful commits explain progress. Artificial activity does not improve the project.

What if you staged the wrong file?

Inspect the staged diff and unstage the unintended file using a non-destructive method. Do not delete the underlying work.

What should a junior developer demonstrate?

They should show a focused change, readable history, respectful review and careful handling of other people's work.

Browse the Sri Lanka work and technology guides for more practical application, AI and workplace projects.

About the author

App Dev Sri Lanka prepared this guide with AI assistance, original examples and the linked primary sources. The collection was informed by Google Trends research for Sri Lanka on 2 September 2026. Illustrations depict fictional people. Examples are educational; this article is not a live vacancy notice or an employer endorsement.

Learn more about App Dev Sri Lanka

Ready to transform your digital presence?

Contact us today to learn more about our services and how we can help your business grow.

Get Started
App Dev Sri Lanka

App Dev Sri Lanka transforms your digital presence with our expert web and app development services in Sri Lanka.

Services
Company
Get Social

© 2026 App Dev Sri Lanka.

Built with

Next.js Logo