2️⃣Git Basics
Fall 2023 | Richie Sun
NOTE: Do not include angle brackets < >
For more information, check out the Git Documentation
Sharing and Updating Repositories
Git Pull
Pulls changes from a remote repository into the current branch. If the current branch is behind the remote, then by default it will fast-forward the current branch to match the remote.
Git Status
Displays paths that have changes between your local repository and the HEAD of the remote repository
Git Add
This command updates the index using the current content found in the working tree, to prepare the content staged for the next commit. To stage all changes, use git add .
Git Commit
Create a new commit containing the current contents of the index and the given log message describing the changes.
Git Push
Updates the main branch of the remote repository based on the last local commit
Branching and Merging
Git Branch:
Lists all existing branches; the current branch will be highlighted in green and marked with an asterisk
Git Checkout:
Last updated