the essential git commands and terms 3. [We handwave away a lot of edge cases / intermediate commands] 4. GitHub! 5. More advanced commands (How Mike works)
Version Control System • Git exists so you can modify/change/break/improve your code, secure in the knowledge that you can not ruin your work too badly because you created save points along the way.
Version Control System • Git exists so you can modify/change/break/improve your code, secure in the knowledge that you can not ruin your work too badly because you created save points along the way • Git allows teams to work together on a common set of files without overwriting each other • Git allows you to see all your past changes and interact with them
out Git can seem like too much of a hassle to be worth using, BUT... • Team Projects may be where Git really shines, but its worth it for solo projects as well (e.g. If computer breaks your code will be safe) • Gives you a skill for working on collaborative projects in the future
! Staging Area: files are in the staging area if the changes in them will be included in the next save point Repository: everything Git is keeping track of
Staging Area: files are in the staging area if the changes in them will be included in the next save point ! Repository: everything Git is keeping track of
which basically says master branch is ready for production, other branches are for work (works well with teams) https:/ /guides.github.com/introduction/flow/
location origin points to, on the master branch, and also in the future I will pull code from this same location Terms: • Upstream: where I will pull code from in the future • Origin: where I put backups or share my code
like someone else’s repo Pull Request: I made some changes that I would like you to include in your repository, please accept them git clone: give me the code at this location
topic away • Try to learn the fundamentals listed above • Learn more advanced commands on a need-to-know basis Google is your friend. These are very common questions
git is there is major value added to your life, just by using the basic commands • Commit your changes as you go • Push them to a remote repository • Repeat
More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together. Encourached by GitHub http:/ /tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Request that changes the visible application • Add a screen shot of the visual changes • BONUS POINTS If possible add an animated gif of new behavior (lots of ways to do this. google "licecap")
1. We realize we need to add April's event data 2. Then we should address feedback on Pull Request #19 3. Update the dog gifs in multiple commits 4. Push our commits to the PR
weird editor ("vi") to enter my commit message Solution To encourage better more intentional commit message, lets set editor to nano git config --global core.editor "nano" git commit [Opens nano] control-x y (to save)
have need to switch back and forth between branches Solution (WIP Commit) • git add . && git commit -m "WIP" • git log --oneline -n 5 • git show HEAD • git reset HEAD~
• Don't be afraid when commiting/undoing changes on a branch, everything* can be undone • Write nice commit messages, please • Commit your changes in small concise chunks
from these great posts • recompilermag.com/issues/issue-1/how-to-teach-git/ • medium.com/@the_taqquikarim/two-questions-to-consider- before-teaching-git-77f5f7eccaea