Closed brianamarie closed 6 years ago
git status
. Frequent git status
is always good!git checkout -b
. Typically, we do the branch creation from the UI, but if we are already past that, I always start with the basic commands first. So, I would recommend using git branch
, then git checkout
for the first few workflows before moving to git checkout -b
. Emphasize understanding the core commands before using shortcuts.git reflog
here. Usually, we don't show git reflog
until much later. The reflog is a history of everywhere HEAD
has pointed locally, and to this point in class, we haven't discussed what HEAD
is at all.git pull
and git log
git log --patch
and git log --stat
both add more information to the log about the content that was added in each commit. If something like this comes up in class and you aren't sure, it's OK to look it up later and come back to it.Cntrl
+ +
on windows will zoom in on applications, for the terminal, browser, and Visual Studio.@brianamarie thank you very much for your time watching the records, I do appreciate your feedback, will keep trying in order to improve our explanation. I wasn't happy with my first teach-back session. I did repeat that :)
master
branchgit status
right off the batgit status
, what do you think I'll see?" Great question - give more time for answers, because this is some of the highest interaction so far.Cntrl
+ +
, and have the window take up the whole screen to make it easier for everyone to follow along.
log
, but you were persistent and you got theregit log
git bisect
would be usedgit add -p
.readme-update
. Don't forget to relate everything back to the GitHub flow, which includes deleting branches and creating new ones for new features.git diff
before anything has been committed, but after the first git add -p
has been run, so there is a different version of index.html
in the working directory, staging area, and in history.Overall, very nice job @SaeedAlbarhami!
@brianamarie Thank you for your great feedback. Actually, I must watch day3 video again, I was partially attending the session.
Were you looking at his screen, or were you reading documentation while he was showing you his problem? I was expecting him to review the request but it was like disabled, I had no clue why that happened!
There was an error with pushing. Do you know why it happened? Would you expect the participants to have this same problem? How could you prevent this problem in the future? Yes, I had to either pull the remote or do force push but I wasn't willing to show him force push and pulling the remote work will fix the renaming issue
In games repository, If I have to show students how to view their own copy of this game page, Is that possible?
I was expecting him to review the request but it was like disabled, I had no clue why that happened!
Ah, I see. In our class repository when we went through on day 1, the settings were already configured to require reviews. This documentation may be helpful for configuring those settings.
Yes, I had to either pull the remote or do force push but I wasn't willing to show him force push and pulling the remote work will fix the renaming issue
π I'm happy you didn't show force push! You're right that pulling fixed it. But, the reason that you needed to pull at all is because you'd made edits to that branch on the remote. The activities as they're written don't have that step, so ideally, you wouldn't need to pull, either.
In games repository, If I have to show students how to view their own copy of this game page, Is that possible?
Yes, this is possible, but only after they'd fixed the game. Typically I show the broken page and say, this is broken, but after we fix it, it will be a Tetris game. I don't think there's anything wrong with showing the Tetris game, as long as it's clear that their games shouldn't look like that yet.
git add .
- at first!git add .
- Another reason we use the script is that the script will create the 6 files, and commit them each separately, so you have a history with 6 commits to edit in the next activities.git commit file1 -m 'file1 is added'
. I would not do this. It does show off the function, but it goes against the reasoning of using the staging area. What's the purpose of having to add files if you use git commit file1 -m 'message'
instead?git commit --amend
git commit --amend
.git commit --amend
does create a new commit, even with using the visualization toolgit reset
are to move where HEAD
is pointing togit cherry-pick
activity.git reset --soft
, maybe a developer made many commits locally but would like to bunch them into one commitgit reset --mixed
, a developer has made several commits locally but would like to restructure the commits so they are more atomic and logicalgit reset --hard
, a developer has been working on a branch locally but has not yet made commits, and would like to undo their work by clearing out their working and staging areagit reflog
is a history of everywhere HEAD
has pointed. It doesn't track things that have never been committedfast-foward
merge, but you didn't merge it to show. Go ahead and do the merge, you can always type undo
in the tool to go back a step. Show the default merges first, then show how git rebase can change the default.rebase-me
branch onto master
, but there was nothing to rebase. That was set up to already be a fast-forward merge, so rebasing did nothing. There would need to be a set up for a recursive
merge, meaning there would need to be new commits on both branches, not just the rebase-me
branch. I think you figured this out on your own near the end. πgit rebase
, but I think you need a little bit more practice. Please let me know if you'd like to go over this in a call sometime. I think it would be good for you to re-do the git rebase
portion. As soon as you do that, and complete the post-test, you will be done! So close, Saeed, and very nice work.
@brianamarie Great day, I have done the forth teach-back
Regards
Recording: https://vimeo.com/246442877/aa716e600a
HEAD
pointergit reset
before going into the details of how π git reset
. You've built that amazing visualization tool for showing the staging area, working directory, and history. It would be good to use that in this section, too. soft
, mixed
, and hard
. git clear
, an alias. Others will not have this command.Great work, @SaeedAlbarhami! This teachback was fantastic, and I've seen so much growth over your teachback videos. Thank you for all of the hard work you put into these. The only step left is to complete this post-test. π
@brianamarie Hope you are doing well, I have completed the post-test two weeks back, I have not got any further updates..
@SaeedAlbarhami Thank you for the mention, I didn't see that the test had been completed. I've graded it and it looks fantastic.
For the next steps, I have a few questions:
I'm inviting you now to the training manual repository. Congratulations, and thank you! π
Recording
@SaeedAlbarhami, I didn't see an existing issue for feedback for the teachbacks, so I opened this issue. The feedback here is meant to be constructive and actionable. Please let me know if there are any questions about what you covered in your Teachback, the feedback I'm leaving here, or anything else. I look forward to seeing your next teachback videos! π
Topic: Introduction to GitHub, Getting Ready for Class, & Getting Started
Topic: GitHub Flow
Topic: Branching
Topic: Local Git Configs
Cntrl
++
. I'd hate for participants to be looking at the files on your desktop instead of what you want them to be looking at. :wink:Topic: Working Locally
git init
until much later.git add .
orgit add --all
. :bowtie: Please avoid these commands - we don't even mention them until the second day if possible - because they can be harmful in several ways.git push -u origin BRANCHNAME
. However, in the video, you are trying to push to master. You would want to push to a new branch with your own name so you can continue the GitHub flow:git push -u origin mysecondbranch
.git push
= network command pushing changes to the remote-u
= short for--set-upstream
, creates the relationship between the remote branch and your local branch so you won't need to enter this information againorigin
= tells Git which remote to push the changes to (you can see all remotes withgit remote -v
)mysecondbranch
= the name of the branch you want to create on the remoteTopic: Collaborating On Code
General notes:
services@github.com
.