Skip to main content

Developing on a branch

Provided the repository is not already pulled locally:

git clone https://github.com/ministryofjustice/<your-repo-name>.git

cd \<your-repo-name>

Confirm you are on the main branch:

git status

Update the repository with any changes to the main branch (if the repository already exists locally):

git pull

Create and checkout a new branch:

git checkout -b <your-branch-name>

At this stage the team works collaboratively to edit the code, to complete the ticket as illustrated in its Definition of Done._

Running git status reflects all changes made to files in the preceding step.

Stage all altered files:

git add -A

Commit the newly stages files:

git commit -m ":gitmoji: <your meaningful commit message>

This page was last reviewed on 27 November 2024. It needs to be reviewed again on 27 November 2025 by the page owner #nvvs-devops .
This page was set to be reviewed before 27 November 2025 by the page owner #nvvs-devops. This might mean the content is out of date.