├── Git_Cheat_Sheet.pdf └── README.md /Git_Cheat_Sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgmil/thinkful-git-ws/46501599dda764f46a8206c052da8d09195df430/Git_Cheat_Sheet.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # thinkful-git-ws 2 | For Thinkful Detroit's Git & GitHub Workshop 3 | 4 | Git is a version-control system that tracks changes made to files and allows for easier collaboration among multiple people 5 | hello world 6 | ## Git 7 | 8 | * What is Git? 9 | * GitHub is the most popular site for remotely saving our code and collaborating with other developers on open source projects 10 | * Local & Remote Branches 11 | * Local - branch stored on your personal computer 12 | * Remote - branch stored in a separate repository, like GitHub, Bitbucket, GitLab, etc 13 | * Branching Strategies 14 | * [Git Flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) 15 | * Git Init 16 | * Command that initializes our file directory into a new Git repo 17 | * Status / Add & Commit 18 | * Status - shows us which files we have changed in our repo, and which files we are currently tracking 19 | * Add - add files to the staging area 20 | * Which files do we want to include in our next commit? 21 | * Commit - saving a snapshot of our recently changed files 22 | * Commit often and frequently 23 | * Usually want to commit whenever we’ve made an incremental change or improvement to one or more files 24 | * Infrequent commits can make it difficult to know where exactly our project broke / what needs to be corrected 25 | * Git Push 26 | * Rolling Back a Commit 27 | * Git Clone 28 | * Copying a project and downloading it to your local machine from a remote repo 29 | * Forking 30 | * Copying a project and creating your own branch, allowing you to hack away without fear of altering repo you forked from 31 | * Merging / Pull Requests 32 | * Merge - combining separate branches of your project, typically to add a new feature while ensuring you don’t break any existing functionality of your project 33 | * Pull Requests - typically a more formal process where you’re asking an assigned person to merge your code into their repo, while explaining the changes you made and why they should be merged 34 | * Merge Conflicts - errors that may arise when trying to merge branches - can sometimes be ignored, but should always be carefully looked at to avoid any breaking changes that may arise from merging the two branches 35 | 36 | 37 | ## Summarize 38 | 39 | Git is our coding time machine. Mistakes and errors in our code are inevitable. Git allows us to roll back to when our code was still working and avoid making the same mistake twice. Git is our coding safety net. It will also allow you in the future to collaborate with others. 40 | 41 | [Take Home Problem](https://codepen.io/chrisbridges/pen/aRLQgo?editors=0010) 42 | --------------------------------------------------------------------------------