Salman Mohammadi."> Basics of git

Trisquel Developer's Cookbook.
by Salman Mohammadi

Basics of git

Git has been used as the revision control system for the development of Trisquel.

installing git

git can be installed on your Trisquel system by using the command in the terminal:

$ sudo apt install git git-doc

git settings

$ git config --global user.name 'Juddy Examlpe-Name'
$ git config --global user.email 'juddy@example.org'

creating an ssh key-pair

uploading your ssh public key

forking the package-helpers repository

Firstly fork the project online using gitlab interface. So you would the forked project under your username.

Cloning the forked repository

Clone the appropriate repository. If you want to work on Trisquel 8 (flidas) package helpers, clone the related branch form your username. It would be something like,

$ git clone -b flidas --single-branch ssh://git@devel.trisquel.info:10022/YOURUSERNAMEHERE/package-helpers.git

changing the directory to the cloned repository

$ cd package-helpers

renaming the remote

$ git remote rename origin myrepo

adding the main repository as a remote

$ git remote add upstream ssh://git@devel.trisquel.info:10022/trisquel/package-helpers.git

ATTENTION: you are advised to create to a new branch before changing the files. Assume we want to fix a bug in the package called zip.

$ git branch fix-zip #creating a new branch
$ git checkout fix-zip #changing the working directory to the new branch

syncing your fork with the latest commits to the main repository

merging the latest codes from upstream

$ git merge upstream flidas

pushing your updated branch to your own repository

$ git push myrepo flidas