1st 2nd 3rd commit commit commit
Each commit represents a version of the code a snapshot in time
A path of commits represents its history.
Then, you can commit changes to the repo
This is a simple linear graph of commits next week well show more complicated graphs
foo.c foo.h
A new commit (i.e. snapshot) is created and added to the graph.
1. 2. 3.
init status add
commit log
Not overly useful in the example above, but we can easily use them for
master
Default starting branch is master
feature
master
feature
ProTip: Can create and checkout a branch together
master
feature
master
feature
master
feature
master
feature
master
feature
master
feature
master
feature
master
feature
master
feature
master
feature
master
clone pull push
git commit git push
Repo hosted on GitHub.
Create a local clone, so you can use your favorite IDE (e.g. IntelliJ), run the code to test your changes, etc. Note: This is exactly like youve seen before
clone
Make and commit some changes (locally)
You push your code to the remote repo
Push
Create a pull request containing changes from your branch to the main branch
Pull Request
Someone on your team merges your pull-request into the main repo (merge privilege)
Pull Request
Merged
Reviews
There are no reviews yet.