Week 3̷4- Office Hours
Part 1 - Rebasing
git log --graph --onelineOpen the terminal in the folder with the repository you used for the homework.
Run
gh browseand add a line toweek-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 mergein the homework? Do that.Resolve the conflict in the editor.
Tell what
git statussuggests and then what the error message suggests in order to finish the rebase, then push to GitHub.git log --graph --onelineHow do the two conflict situations differ?
Part 2

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).
Git command anatomy
We'll talk about what individual pieces of a git command represent.
Undoing in git
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.
Prepare files and folders
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.
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:
Follow along
The commands below should be run one at a time even if they are printed in one code block.
Folder tree, root
Go to the git-course folder and run tree . in the Terminal.
Repository root
Commits, staging, head
Last updated