▶ Git, GitHub, and GitHub Actions for Beginners:
• Git for Beginners: What Git, GitHub, and G...
In this Git for Beginners lesson, you will learn how to view Git commit history, check file changes, undo uncommitted changes, and fix the last commit.
In this lesson, you will learn how to read Git history, check changes with git diff, undo uncommitted changes with git restore, and fix the last commit using git commit --amend.
I also explain why small, clear commits and good commit messages make your Git history easier to understand.
00:00 Introduction
00:32 Why you need to look at Git history
01:42 git log — how to read commit history
03:21 git diff — how to see changes
06:39 git restore — how to undo uncommitted changes
08:27 How to fix the last commit on a basic level
10:46 Why small and clear commits matter
12:00 Good and bad commit messages
12:55 Summary and what will be in the next lesson
Commands used in this lesson:
git log — shows the full commit history.
git log --oneline — shows the commit history in a short, compact format.
cat README.md — prints the content of README.md in the terminal.
git diff — shows the difference between the last commit and the current uncommitted changes.
git restore README.md — removes uncommitted changes in README.md and restores the file to the last committed version.
git commit --amend -m "change app port to 9090" — changes the last commit and replaces its message with a better one.
#Git #GitHub #DevOps