Week 3̷4- Office Hours
Last updated
Last updated
git log --graph --oneline
Open the terminal in the folder with the repository you used for the homework.
Run gh browse
and add a line to week-3.txt
, commit changes.
Add a line to "week-3.txt" locally, stage, commit.
git push
. What is the problem?
Download data from GitHub without pulling.
What was the alternative to git merge
in the homework? Do that.
Resolve the conflict in the editor.
Tell what git status
suggests and then what the error message suggests in order to finish the rebase, then push to GitHub.
git log --graph --oneline
How do the two conflict situations differ?
This week, we'll discuss the meaning of the following terms:
Commit.
Staging (aka Adding).
Committing.
Folder Tree, Repository Root.
Working Tree.
Staging Area (aka Index).
HEAD.
Repository (aka Repo).
We'll talk about what individual pieces of a git command represent.
One of the points of version-controlling code and text is to be able to undo mistakes. We'll see different versions of how this can be done.
Go to this link, download the files as an archive (click Code
-> Download Zip
), unzip it into the folder where you keep everything related to this course.
We could have done a git clone
instead but it is useful to know that you can just download the files if you need to.
If you only have a single folder with one of the repos you created earlier then create a new folder, and put both the repo folder and the folder with the unzipped files. Here is what the folder structure should look like:
The names of the folders and the exact structure isn't important. The main thing to avoid is this:
The commands below should be run one at a time even if they are printed in one code block.
Go to the git-course
folder and run tree .
in the Terminal.