Get started: Git - Llama-Group/Project-Llama GitHub Wiki

Basic knowledge of using git to contribute to this project

Idea of the use of git in this project:

  • Each branch is a "version" of the whole project.
  • Pull request(PR) is showing others what you have done, every time you push a new branch to remote, you will create a PR for it. Then they can review your work, and choose to merge to master(apply your work to a "most certain/stable/fundamental branch"), or ask you to change some details.
  • Each PR consists of several commits(or just one). A commit is some changes of the project you have authorised, named, detailed and signed.
  • e.g. A white wall(your project), you decide to draw an elephant on it(you create a local branch), you start drawing on your computer, you draw four legs(1 commit), you draw the head(another commit), you finished the elephant on your computer, now you want someone to check your work(create a PR), they said yes! Then they used a magic printer printed your elephant on the white wall(merge).

First thing first, get a copy of master branch:

git clone --recursive https://github.com/Llama-Group/Project-Llama

Next time you update the master branch, don't clone it again, just:

git pull --recurse-submodules

Beware: cd into the project folder before pull.

Before contributing to this project, a branch have to be created:

git checkout -b [your_branch_name]

Branch naming guide:

Add prefix to your branch name, with category:

Prefix list:

  • feature/
  • fix/
  • refactor/

Commit:

git commit -s

Commit style guid:

  • [Title]
  • [Blank line]
  • [Detail]
  • [Blank line]
  • [Automatically added sign-off]

Issue: Create on Github if you want to do something or want someone to do something.

Push:

git push origin [branch name]

Note: You do not have privilege to push to master.

Merge:

Merge master to your branch, when it says conflict on your pr.

git checkout master
git pull
git checkout [your branch]
git merge master

And solve your conflict then.

Merge your branch to master(which you might not have privilege to do so).

⚠️ **GitHub.com Fallback** ⚠️