Module 2 Exercise 1: Network activity


(Jaime Rabasco Ronda) #123


(Mihaela Sabin) #124

mcs_admin labs $ git init individual-work

Initialized empty Git repository in /Users/mcs_admin/comp7805/2018-fall/labs/individual-work/.git/

mcs_admin labs $ cd individual-work/

mcs_admin (master #) individual-work $ ls -al

total 0

drwxr-xr-x 3 mcs_admin staff 102 Sep 7 06:49 .

drwxr-xr-x 4 mcs_admin staff 136 Sep 7 06:49

drwxr-xr-x 10 mcs_admin staff 340 Sep 7 06:49 .git

mcs_admin (master #) individual-work $ touch readme.md

mcs_admin (master #) individual-work $ git status

On branch master

No commits yet

Untracked files:

(use “git add <file>…” to include in what will be committed)

readme.md

nothing added to commit but untracked files present (use “git add” to track)

mcs_admin (master #) individual-work $ git add readme.md

mcs_admin (master +) individual-work $ git stuats

git: ‘stuats’ is not a git command. See ‘git --help’.

The most similar command is

status

mcs_admin (master +) individual-work $ git status

On branch master

No commits yet

Changes to be committed:

(use “git rm --cached <file>…” to unstage)

new file: readme.md

mcs_admin (master +) individual-work $ git diff

mcs_admin (master +) individual-work $ git commit -m ‘initialized individual-work project’

[master (root-commit) 4b377ef] initialized individual-work project

1 file changed, 0 insertions(+), 0 deletions(-)

create mode 100644 readme.md

mcs_admin (master) individual-work $ nano readme.md

mcs_admin (master *) individual-work $ git add readme.md

mcs_admin (master +) individual-work $ git commit -m ‘added learning objectives in readme.md’

[master b7756bc] added learning objectives in readme.md

1 file changed, 9 insertions(+)

mcs_admin (master) individual-work $ git log

commit b7756bc4f30e81021e6d4a963f761096a639c15d ( HEAD -> master )

Author: Mihaela Sabin <mihaela.sabin@unh.edu>

Date: Fri Sep 7 06:55:00 2018 -0400

added learning objectives in readme.md

commit 4b377ef252da6d2216c22fc6d706e246327f561d

Author: Mihaela Sabin <mihaela.sabin@unh.edu>

Date: Fri Sep 7 06:50:23 2018 -0400

initialized individual-work project

mcs_admin (master) individual-work $ git remote

mcs_admin (master) individual-work $ git remote add origin https://github.com/comp525-spring-2018/individual-work.git

mcs_admin (master) individual-work $ git remote

origin

mcs_admin (master) individual-work $ git push -u origin master

Counting objects: 6, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (3/3), done.

Writing objects: 100% (6/6), 575 bytes | 115.00 KiB/s, done.

Total 6 (delta 0), reused 0 (delta 0)

To https://github.com/comp525-spring-2018/individual-work.git

  • [new branch] master -> master

Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.

mcs_admin (master) individual-work $ git log

commit b7756bc4f30e81021e6d4a963f761096a639c15d ( HEAD -> master , origin/master )

Author: Mihaela Sabin <mihaela.sabin@unh.edu>

Date: Fri Sep 7 06:55:00 2018 -0400

added learning objectives in readme.md

commit 4b377ef252da6d2216c22fc6d706e246327f561d

Author: Mihaela Sabin <mihaela.sabin@unh.edu>

Date: Fri Sep 7 06:50:23 2018 -0400

initialized individual-work project

mcs_admin (master) individual-work $ git fetch

remote: Counting objects: 3, done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0

Unpacking objects: 100% (3/3), done.

From https://github.com/comp525-spring-2018/individual-work

b7756bc…3c3d9a0 master -> origin/master

mcs_admin (master) individual-work $ git log

commit b7756bc4f30e81021e6d4a963f761096a639c15d ( HEAD -> master )

Author: Mihaela Sabin <mihaela.sabin@unh.edu>

Date: Fri Sep 7 06:55:00 2018 -0400

added learning objectives in readme.md

commit 4b377ef252da6d2216c22fc6d706e246327f561d

Author: Mihaela Sabin <mihaela.sabin@unh.edu>

Date: Fri Sep 7 06:50:23 2018 -0400

initialized individual-work project

mcs_admin (master) individual-work $ nano readme.md

mcs_admin (master) individual-work $ git status

On branch master

Your branch is behind ‘origin/master’ by 1 commit, and can be fast-forwarded.

(use “git pull” to update your local branch)

nothing to commit, working tree clean


(Ali Bayram) #125

remote


(Lescano Micaela) #126

Opsie I missed posting this one
Here it is:


(Dr. Ayaz H. Khan) #127

Sorry to late.
I forgot to complete this task.


(Carla Giner) #128


(Nathan Eloe) #129

I’m using GitHub Classroom for my courses this semester, so I just used a previously existing lab for my OS class. Hopefully this doesn’t violate the sprit of the activity?


(Hernando Enrique Moreno Moreno) #130

Exercise: Wrok with remotes


Thank you


(Debra M. Duke) #131


(Michael Clausen) #132

For simplicity I just added my module 2 repo as remote “origin”.
@mozzadrella: Hope this is ok, otherwise let me know…

Cheers


(Robert Foreman) #133


(Christian Nievas) #134

ex2-1


(Chris Cannon) #135

Absolutely not! Love to see you integrating your current materials already, it makes the training more applicable for you! :100: :fire:


(Lluisgarciapons) #136

2


(Baptiste Pesquet) #137

53


(Chris Janes) #138

It did feel strange to only fetch and not then merge; though I understand the teaching process behind it!


(Konstantin) #139


(Cperezs) #140


(Jose E Calderon) #141

Here is my work.
image

and the Repo in GitHub


(Pol Benedito Momplet) #142