Skip to content
Snippets Groups Projects
README.md 3.48 KiB
Newer Older
Bourdel Laurent's avatar
Bourdel Laurent committed
Source Package for Embedded Linux Lab

Command line instructions

Bourdel Laurent's avatar
Bourdel Laurent committed
0/ Clone Teacher Repo in terminal window
Bourdel Laurent's avatar
Bourdel Laurent committed

Bourdel Laurent's avatar
Bourdel Laurent committed
Clone repo in your home

git clone ssh://git@gitlab.insa-rennes.fr:16022/EmbeddedLinux_Group/EmbeddedLinux_UDOO-NEO.git

Go inside folder created : cd EmbeddedLinux_UDOO-NEO

1/ Config your git ID in terminal windows

git config --global user.name "Name SurName"

git config --global user.email "surname.name@insa-rennes.fr"
(info stored in ~/.gitconfig)

2/ Create your GitLab INSA account on web browser
Bourdel Laurent's avatar
Bourdel Laurent committed

https://gitlab.insa-rennes.fr/

Ask Teacher to add you member of group EmbeddedLinux_UDOO-NEO with Maintainer rights

Bourdel Laurent's avatar
Bourdel Laurent committed
3/ Create your Repo on GitLab INSA on web browser
Bourdel Laurent's avatar
Bourdel Laurent committed

"New Project" button

Choose group "EmbeddedLinux_Group" (drop down menu Project path) 

Name Project like "4CDTI-P2020-<YourName>-LabUdooNeo"

Add your co-worker as developer role (Settings/Menbers)

Bourdel Laurent's avatar
Bourdel Laurent committed
4/ Create SSH keys for rights access on GitLab INSA account in terminal window
Bourdel Laurent's avatar
Bourdel Laurent committed

cmdline : ssh-keygen

Generating public/private rsa key pair.

Enter file in which to save the key (/home/user/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in id_rsa.

Your public key has been saved in id_rsa.pub.

Display your public key : cat ~/.ssh/id_rsa.pub

Bourdel Laurent's avatar
Bourdel Laurent committed
5/ Add public key on GitLab INSA account on web browser

Bourdel Laurent's avatar
Bourdel Laurent committed
Copy text and paste it to GitLAB INSA (Profile/Settings/SSH keys)

Zip .ssh folder and send by mail yours keys for future use 

Bourdel Laurent's avatar
Bourdel Laurent committed
6/ Config origin-teacher & ryour origin repo in terminal window
git remote rename origin origin-teacher
Bourdel Laurent's avatar
Bourdel Laurent committed

Bourdel Laurent's avatar
Bourdel Laurent committed
git remote add origin ssh://git@gitlab.insa-rennes.fr:16022/EmbeddedLinux_Group/4CDTI-P2020-<YourName>-LabUdooNeo
git remote -v
Bourdel Laurent's avatar
Bourdel Laurent committed
7/ Push your local directory to your personal repo in terminal window
Bourdel Laurent's avatar
Bourdel Laurent committed
git status
git push -u origin --all
git push -u origin --tags
Bourdel Laurent's avatar
Bourdel Laurent committed
git status

Bourdel Laurent's avatar
Bourdel Laurent committed
9/ Check if your local repo is pushed on Gitlab repo on web browser
Bourdel Laurent's avatar
Bourdel Laurent committed
OK ?

Bourdel Laurent's avatar
Bourdel Laurent committed
10/ Submit your LAB codes in terminal window
Bourdel Laurent's avatar
Bourdel Laurent committed

git add .

git status

Bourdel Laurent's avatar
Bourdel Laurent committed
11/ Commit your modification when needed in terminal window
Bourdel Laurent's avatar
Bourdel Laurent committed

git commit -a -m "message to explain commit content"

or git commit -a
(vim command : 'i' to insert, 'ESC' to leave edit mode, ':wq' to save commit message)

Bourdel Laurent's avatar
Bourdel Laurent committed
12/ Push your modification on GitLab server in terminal window
Bourdel Laurent's avatar
Bourdel Laurent committed

git push origin master

Bourdel Laurent's avatar
Bourdel Laurent committed
git log
git log -p
git log --stat

13/ Check on GitLab server "new activity" on web browser
Bourdel Laurent's avatar
Bourdel Laurent committed

Bourdel Laurent's avatar
Bourdel Laurent committed
14/ If Teacher updates repo,  in terminal window
Bourdel Laurent's avatar
Bourdel Laurent committed

Bourdel Laurent's avatar
Bourdel Laurent committed
get modification's historical from remote repo : git fetch origin-teacher master
Bourdel Laurent's avatar
Bourdel Laurent committed

Bourdel Laurent's avatar
Bourdel Laurent committed
check modifications by : git diff --name-only master origin-teacher/master
Bourdel Laurent's avatar
Bourdel Laurent committed

Bourdel Laurent's avatar
Bourdel Laurent committed
update (merge) modif by : git pull origin-teacher master
Bourdel Laurent's avatar
Bourdel Laurent committed

!!! Well Done !!!

Bourdel Laurent's avatar
Bourdel Laurent committed
// Initial README
Bourdel Laurent's avatar
Bourdel Laurent committed

Command line instructions

Git global setup
Bourdel Laurent's avatar
Bourdel Laurent committed
git config --global user.name "Bourdel Laurent"
Bourdel Laurent's avatar
Bourdel Laurent committed
git config --global user.email "laurent.bourdel@insa-rennes.fr"

Create a new repository
git clone ssh://git@gitlab.insa-rennes.fr:16022/Laurent.Bourdel/EmbeddedLinux_UDOO-NEO.git
Bourdel Laurent's avatar
Bourdel Laurent committed
cd EmbeddedLinux_UDOO-NEO
Bourdel Laurent's avatar
Bourdel Laurent committed
touch README.md
Bourdel Laurent's avatar
Bourdel Laurent committed
git add README.md
Bourdel Laurent's avatar
Bourdel Laurent committed
git commit -m "add README"
Bourdel Laurent's avatar
Bourdel Laurent committed
git push -u origin master

Existing folder
Bourdel Laurent's avatar
Bourdel Laurent committed
cd existing_folder
Bourdel Laurent's avatar
Bourdel Laurent committed
git init
Bourdel Laurent's avatar
Bourdel Laurent committed
git remote add origin ssh://git@gitlab.insa-rennes.fr:16022/Laurent.Bourdel/EmbeddedLinux_UDOO-NEO.git
Bourdel Laurent's avatar
Bourdel Laurent committed
git add .
Bourdel Laurent's avatar
Bourdel Laurent committed
git commit -m "Initial commit"
Bourdel Laurent's avatar
Bourdel Laurent committed
git push -u origin master

Existing Git repository
cd existing_repo
Bourdel Laurent's avatar
Bourdel Laurent committed
git remote rename origin old-origin
Bourdel Laurent's avatar
Bourdel Laurent committed
git remote add origin ssh://git@gitlab.insa-rennes.fr:16022/Laurent.Bourdel/EmbeddedLinux_UDOO-NEO.git
Bourdel Laurent's avatar
Bourdel Laurent committed
git push -u origin --all
Bourdel Laurent's avatar
Bourdel Laurent committed
git push -u origin --tags