This lesson goes over version control using git.
How to track what changed, who changed it, and why.
โ
Setup git to track changes in your notes/
directory
(you will need install xcode command line tools xcode-select --install
)
โ Make a commit
โ Try using the source control tab with GitLens extension in VSCode and GitPod workspaces
Repository tracks and saves history of changes in a git project
Commit a snapshot in the repository timeline
Branch an independent version of the repository
Merge a git command that combines 2 branches into 1 branch
git init
create an empty Git repository or reinitialize an existing one
git status
see status of this repository
git log
show commit logs
git add
add file contents to the index
git commit
record changes to the repository
git branch
list, create, or delete branches
git merge
join two or more development histories together
git reset
reset current HEAD to the specified state
(๐ thatโs a lot to remember. we can just use VSCode for now ๐)
In order to track changes in your notes/
directory
Open a terminal and navigate to your notes/
directory
Type in git init
to setup a new git repository
This command creates a .git/
folder to track changes
Use git add
to stage files you want to commit
git add .
If you want to add everything
git commit -m "Initial commit"
This creates a .git/
folder to track changes
Commit messages help a future reader quickly understand what changed and why it changed
Please read this post on Best Practices
debugging
I added a delete route to the accounts controller
chanages
Enable logging globally
Add account delete route
I highly recommend using a git GUI tool
VSCode source control with GitLens