Docsity
Trusted Seller

Github / git - esempi pratici, Esercizi di Fondamenti di informatica

Toggle sidebar
bg1
GITHUB VERIFICA
ESERCIZIO GRUPPO 1
TRACCIA ESERCIZIO 18/05/2022 5
Feature 03 6
Riaprire il codice e mostrare le modifiche 8
ESERCIZIO GRUPPO
git clone https://github.com/../demo01-r1.git
cd demo01-r1
git config --local user.name "Luca Rossi"
git config --local user.email "[email protected]"
git remote set-url origin
https://[email protected]/../demo01-r1.git
git branch develop
git branch testing
git log
git push
aggiorna
git pull
demo01-r1 % git pull
Already up to date.
demo01-r1 % git branch
develop
* main
testing
demo01-r1 % git push
Everything up-to-date
demo01-r1 % git pull
Already up to date.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Anteprima parziale del testo

Scarica Github / git - esempi pratici e più Esercizi in PDF di Fondamenti di informatica solo su Docsity!

GITHUB VERIFICA

ESERCIZIO GRUPPO 1

TRACCIA ESERCIZIO 18/05/2022 5

Feature 03 6 Riaprire il codice e mostrare le modifiche 8

ESERCIZIO GRUPPO

git clone https://github.com/../demo01-r1.git cd demo01-r git config --local user.name "Luca Rossi" git config --local user.email "[email protected]" git remote set-url origin https://[email protected]/../demo01-r1.git git branch develop git branch testing git log git push aggiorna git pull demo01-r1 % git pull Already up to date. demo01-r1 % git branch develop

  • main testing demo01-r1 % git push Everything up-to-date demo01-r1 % git pull Already up to date.

demo01-r1 % git fetch demo01-r1 % git status On branch main Your branch is up to date with 'origin/main'. nothing to commit, working tree clean demo01-r1 % ls index.html theme.css demo01-r1 % nano index.html demo01-r1 % git checkout develop M index.html Switched to branch 'develop' demo01-r1 % nano index.html demo01-r1 % git commit -m "aggiunto paragrafo 2" On branch develop Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: index.html no changes added to commit (use "git add" and/or "git commit -a") demo01-r1 % git add index.html demo01-r1 % git status On branch develop Changes to be committed: (use "git restore --staged ..." to unstage) modified: index.html demo01-r1 % git commit -m "aggiunto paragrafo 2" [develop b80887e] aggiunto paragrafo 2 1 file changed, 3 insertions(+), 1 deletion(-) demo01-r1 % git push -u origin develop Enumerating objects: 5, done. Counting objects: 100% (5/5), done. Delta compression using up to 8 threads Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 355 bytes | 355.00 KiB/s, done. Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (1/1), completed with 1 local object. remote: remote: Create a pull request for 'develop' on GitHub by visiting: remote: https://github.com/../demo01-r1/pull/new/develop remote: To https://github.com/../demo01-r1.git

  • [new branch] develop -> develop Branch 'develop' set up to track remote branch 'develop' from 'origin'.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Paragrafo 3

Lorem ipsum dolor, sit amet consectetur adipisicing elit. Molestiae, alias.

Paragrafo 5

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Explicabo, pariatur?

Paragrafo 23

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Explicabo, pariatur?

theme.css @import url('https://fonts.googleapis.com/css?family=Comfortaa&display=swap'); html { line-height: 1.15; -webkit-text-size-adjust: 100%; font-family: Comfortaa; font-size: 1.3em; } code { font-size: 1.5em; } body { margin: 5em; } main { display: block; } h1 { font-size: 7em; margin: 0.67em 0;

h2 { color: chartreuse; } hr { box-sizing: content-box; height: 0; overflow: visible; } li { line-height: 1.7em; }

TRACCIA ESERCIZIO 18/05/

Per questo esercizio utilizzeremo i seguenti branch: develop: branch di sviluppo da cui staccare le nuove features main: branch di rilascio da cui staccare i nuovi rilasci

STEP 1

  • scegliere una feature da implementare
  • staccare un feature branch da develop partendo dal branch di develop, creare un feature branch, spostarsi nel nuovo branch (git branch, git switch)
  • nel feature branch implementare la feature e fare la push del feature branch su origin controllare che il proprio feature branch sia consistente e funzioni correttamente (git push -u origin)
  • riallineare il merge di develop spostarsi sul branch di develop, e riallinearsi con origin (git fetch, git pull) riallineare il feature branch (git merge) risolvere eventuali conflitti rispettando l'ordine del menu verificare che tutto funzioni correttamente effettuare la commit delle modifiche effettuate effettuare il push di develop su origin (git push) Features:

git clone https://[email protected]/ITS-VERSIONCONTROL/e sercizio-4-fila-1.git cd esercizio-4-fila- ls esercizio.txt index.html style.css git pull git switch develop git remote set-url origin https://[email protected]/ITS-VERSIONCONTROL/e sercizio-4-fila-1.git git status On branch develop Your branch is up to date with 'origin/develop'. nothing to commit, working tree clean git branch

  • develop main git switch feature- git branch develop
  • feature- main nano index.html nano ordini-vendita.html ls esercizio.txt index.html ordini-vendita.html style.css git commit -am "aggiunto link 3.ordini vendita e pagina ordini-vendita.html" git status On branch feature- nothing to commit, working tree clean git push --set-upstream origin feature-

git push -u origin git switch develop Switched to branch 'develop' Your branch is up to date with 'origin/develop'. git status On branch develop Your branch is up to date with 'origin/develop'. git fetch git merge feature- Auto-merging index.html CONFLICT (content): Merge conflict in index.html nano index.html git add. git commit -m "risolto conflitto feature-03" git merge feature- Already up to date. git push git log commit fdd92a0b08ef6bf6ec31555c3793afc2ba58fcaf ( HEAD -> develop , origin/develop ) Merge: 8896420 ad53fc Author: luca Date: Wed May 18 09:49:48 2022 + risolto conflitto feature- commit ad53fc78d2c4e760f0c1f5ab433bf181b914b07c ( origin/feature-03 , feature-03 ) Author: luca Date: Wed May 18 09:45:05 2022 + aggiunto link 3.ordini vendita e pagina ordini-vendita.html

Riaprire il codice e mostrare le modifiche

git init https://github.com/../esercizio-4-fila-1.git cd esercizio-4-fila-

nanagrafica-fornitori Back

Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, odit ullam perferendis nisi quo veniam? Assumenda facilis officiis nemo provident!

esercizio. txt Per questo esercizio utilizzeremo i seguenti branch: develop: branch di sviluppo da cui staccare le nuove features main: branch di rilascio da cui staccare i nuovi rilasci

STEP 1

  • scegliere una feature da implementare
  • staccare un feature branch da develop partendo dal branch di develop, creare un feature branch, spostarsi nel nuovo branch (git branch, git switch)
  • nel feature branch implementare la feature e fare la push del feature branch su origin controllare che il proprio feature branch sia consistente e funzioni correttamente (git push -u origin)
  • riallineare il merge di develop spostarsi sul branch di develop, e riallinearsi con origin (git fetch, git pull) riallineare il feature branch (git merge) risolvere eventuali conflitti rispettando l'ordine del menu verificare che tutto funzioni correttamente effettuare la commit delle modifiche effettuate effettuare il push di develop su origin (git push) Features: **** attenzione: la voce menu di esempio va rimossa *** 001 - nel menu principale aggiungere la voce '1. anagrafica clienti' che punta alla pagina anagrafica-clienti.html, creare il nuovo file html stilato con un titolo congruo e un paragrafo di testo 'Lorem ipsun..' e un'ancora 'Back' che punta a index.html

002 - nel menu principale aggiungere la voce '2. anagrafica fornitori' che punta alla pagina anagrafica-fornitori.html, creare il nuovo file html stilato con un titolo congruo e un paragrafo di testo 'Lorem ipsun..' e un'ancora 'Back' che punta a index.html 003 - nel menu principale aggiungere la voce '3. ordini vendita' che punta alla pagina ordini-vendita.html, creare il nuovo file html stilato con un titolo congruo e un paragrafo di testo 'Lorem ipsun..' e un'ancora 'Back' che punta a index.html 004 - nel menu principale aggiungere la voce '4. ordini acquisto' che punta alla pagina ordini-acquisto.html, creare il nuovo file html stilato con un titolo congruo e un paragrafo di testo 'Lorem ipsun..' e un'ancora 'Back' che punta a index.html 005 - nel menu principale aggiungere la voce '5. fatture' che punta alla pagina fatture.html, creare il nuovo file html stilato con un titolo congruo e un paragrafo di testo 'Lorem ipsun..' e un'ancora 'Back' che punta a index.html

STEP 2

Task: 006 - rilasciare una release allineare main al branch di develop staccare il branch release/1. effettuare la push di main su origin effettuare la push di release/1.0 su origin 007 - modificare la dimensione del font di h1 a 3.5, impostare la dimensione di h2 a 1. 008 - inserire un colore di background (#F8F8FF) 009 - impostare il colore di background della lista (#D3D3D3) 010 - modificare il testo della voce "Menu" in "Menu principale"

STEP 3

Rilascio della versione 2. fatture-vendita.html

Ordini Acquisto

Back

Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae, dolores, maxime et eius architecto ullam minima expedita placeat aliquid, mollitia sit? Neque nisi est quisquam quo obcaecati, illum laudantium provident!

Back

ordini-vendita.html

Ordini Vendita

Lorem ipsum

Back

style.css html { line-height: 1.15; font-family: Arial, Helvetica, sans-serif; font-size: 1.3em; } body { margin: 5em; background-color: #F8F8FF; } h1 { font-size: 3.5em;

h2 { font-size: 1.5em; } hr { box-sizing: content-box; height: 0; overflow: visible; } li { color: mediumorchid; line-height: 1.7em; background-color: #D3D3D3; }