Module 2 Exercise 1: Network activity

(Vanessa) #1


So in this section we’re going to learn how to use Git (and start to use GitHub) for individual work, solo. We’ll learn how to work with remotes, manage repositories, and navigate GitHub permissions in the web UI.

Accept Module 2

2.1 No exercise :slight_smile:

Proceeed to video 2.2 for the next exercise.

2.2 Work with remotes

Exercise: Work with remotes

  1. On the command line: create a repository from the command line called “individual-work.”
  2. On, create a repository.
  3. On, upload your first week’s assignments to the “Individual” repository.
  4. Use the command line to bring the commits back down to your local repository.

Post a screenshot of your terminal output for these steps below.

Module 1 Exercise 1: Git basics
(Mr Allatta) #2

Most of my time here was spent figuring out where my username was being cached. I’ve been using and learning git for a little while, but I created a new account with my school email to start administering classroom assignments. I’m using Windows, and even though I changed the configuration file, it turns out there is a Windows credential manager that was remembering my personal username.

(Mr Allatta) #3

Module Feedback: The directions for the 2.1 exercise say to the “bring commits back down to your local repository.” However, the instruction for fetch is in the 2.2 video.

(Clara) #4

The first week’s assignment is an empty readme - or is the idea to add the example readme with the list of learning objectives from Module 2?

(Mario Jorge Pereira) #5

(Richard) #6

This exercise doesn’t ask for a screen shot, and most of these here don’t correspond to the exercise, but here is one anyway. Half of these tasks are based on 2.2 though?

(Vanessa) #7

@MrAllatta and @barnsza I had this as exercise 2.2 but that seemed to confuse people. You do need fetch before you can complete this. :bulb: about how to design are welcome :sparkling_heart:

(Richard) #8

@mozzadrella You could potentially just split the exercise into two really small ones? It did seem odd to me that 2.2 (thus far, only just finished 2.4) is the only section without an exercise.

Or, perhaps, make the existing exercise 2.2, and reintroduce the exercise from the 2.1 video for teachers to actually do? (i.e., get them to create a repo and pull it.)

(Mike Crabb) #9

Many Thanks!

(François Roland) #10

(Ricardo Martin Marcucci) #11


(Omal Perera) #12

Merged the remote changes using git merge FETCH_HEAD


Actually this answer is for Module 2 Exercise 2 :smiley:


(Mario Jorge Pereira) #13

(Nbzeman) #14

(Guntbert Reiter) #15

@mozzadrella I find navigation a bit difficult. For instance, once I have closed my assignment there seems to be no easy way back :confused:

One other confusing thing: currently “my” is different from the one at the top of this page (the exercises are still part of 2.1 in my version)

(Knpau) #16


(Luigi Menale) #17

(Benjamin Soltoff) #18
Last login: Thu Mar  1 13:25:16 on ttys000
Benjamins-MacBook-Pro:~ soltoffbc$ cd Projects/Computing\ for\ Social\ Sciences/temp/
Benjamins-MacBook-Pro:temp soltoffbc$ git init individual-work
Initialized empty Git repository in /Users/soltoffbc/Projects/Computing for Social Sciences/temp/individual-work/.git/
Benjamins-MacBook-Pro:temp soltoffbc$ cd individual-work/
Benjamins-MacBook-Pro:individual-work soltoffbc$ git remote -v
Benjamins-MacBook-Pro:individual-work soltoffbc$ git remote add origin
Benjamins-MacBook-Pro:individual-work soltoffbc$ git pull -u origin master
error: unknown switch `u'
usage: git pull [<options>] [<repository> [<refspec>...]]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --progress            force progress reporting
                          control for recursive fetching of submodules

Options related to merging
    -r, --rebase[=<false|true|preserve|interactive>]
                          incorporate changes by rebasing rather than merging
    -n                    do not show a diffstat at the end of the merge
    --stat                show a diffstat at the end of the merge
    --log[=<n>]           add (at most <n>) entries from shortlog to merge commit message
    --squash              create a single commit instead of doing a merge
    --commit              perform a commit if the merge succeeds (default)
    --edit                edit message before committing
    --ff                  allow fast-forward
    --ff-only             abort if fast-forward is not possible
    --verify-signatures   verify that the named commit has a valid GPG signature
    --autostash           automatically stash/stash pop before and after rebase
    -s, --strategy <strategy>
                          merge strategy to use
    -X, --strategy-option <option=value>
                          option for selected merge strategy
    -S, --gpg-sign[=<key-id>]
                          GPG sign commit
                          allow merging unrelated histories

Options related to fetching
    --all                 fetch from all remotes
    -a, --append          append to .git/FETCH_HEAD instead of overwriting
    --upload-pack <path>  path to upload pack on remote end
    -f, --force           force overwrite of local branch
    -t, --tags            fetch all tags and associated objects
    -p, --prune           prune remote-tracking branches no longer on remote
    -j, --jobs[=<n>]      number of submodules pulled in parallel
    --dry-run             dry run
    -k, --keep            keep downloaded pack
    --depth <depth>       deepen history of shallow clone
    --unshallow           convert to a complete repository
    --update-shallow      accept refs that update .git/shallow
    --refmap <refmap>     specify fetch refmap

Benjamins-MacBook-Pro:individual-work soltoffbc$ git fetch
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
 * [new branch]      master     -> origin/master
Benjamins-MacBook-Pro:individual-work soltoffbc$ git status
On branch master

No commits yet

nothing to commit (create/copy files and use "git add" to track)

Forgot to use git fetch at first


@mozzadrella! Fun exercise again!
Here is my small opinions :slight_smile:

  1. This page says there is no exercise for 2.1, but the GitHub Module pages shows the exercise right under the 2.1, so it was little confused at the fist time! I think it would be great if you put the
    Exercise: Work with remotes… under 2.2, not 2.1!

  1. Also, I wish I have link to go back to this module, from the GitHub, like “submit your exercise here!” I figured out this is right place to submit, after compared with other people’s replies!

Thank you so much for offering nice course! Now I am learning more clearly!!!

(Oscar Oliveira) #20