This homework is due 2/21 at 11:59pm. Written answers should be submitted in an <ANDREWID>.txt file to Autolab.
Create a new git repository somewhere in your filesystem, and configure a
remote (called whatever you want, it doesn't matter to me) with the remote
URL andrewID@unix.andrew.cmu.edu:/afs/andrew/course/98/174/public/hw5repo
.
git clone
the repo from
afs. If you had done so, what would the output of git remote -v
be?
Run git fetch remotename
(substituting your remote name for
remotename).
master
branch with the remote one, and
give the command you used to do so.master
branch was updated on the
remote. But it's possible that when we ran git fetch
, we
fetched other branches as well! How could we (i.e. what command could we
use) find all the branches we may have gotten from the remote?python3 hw5.py
and you'll be prompted for your Andrew ID.
The program will output a file that is unique to you, and this is how
we'll track if you did the homework, so don't change anything about it.everyone.txt
. You are going to commit both your
unique file and make changes to at least 3 non-consecutive lines in everyone.txt
on a
separate branch with the same name as your Andrew ID. After, merge in
your branch to master, and push both your branch and the commits on
master.In lecture, I was careful to explain the two-step procedure of using
git fetch
and git merge remotename/branchname
to
get commits from a remote. When would this be a good idea as opposed to
simply doing git pull remotename branchname
? Briefly discuss
remote-tracking branches and their relevance in your answer.