The Value of Git
- Merging work without overwriting
- Easy backs up with restore points
Git is a complex tool
Git is a wonderful, complex, and powerful piece of software. Unfortunately, this complexity and power creates a high barrier to entry for new users. The good news is you can avoid much of this complexity using Bare Minimum Git. I used this technique myself when learning Git and have taught other programmers, as well. These programmers are now using the more advanced features of Git but starting with the Bare Minimum Git allowed them to enjoy the benefits of Git on day one.
Resources
Bare Minimum Git Presentation Deck
Bare Minimum Git Cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------- | |
# Bare Minimum Git Cheatsheet | |
# http://ironco.de/bare-minimum-git/ | |
# ver 20140411 | |
# ----------------------------------------------------------------- | |
# initialize a git repo | |
git init | |
# add .gitignore file into project root | |
# the first line is for a WordPress project | |
# the second line is for a general web project | |
curl -O https://gist.githubusercontent.com/salcode/9940509/raw/.gitignore | |
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore | |
# add all new or changed files | |
# (put them in the envelope) | |
git add -A | |
git status | |
# commit your changes with a label | |
# (seal the envelope) | |
git commit -m 'fix misspelled name' | |
git status | |
# pull changes from the shared repo | |
git pull --rebase | |
git status | |
# push your changes to the shared repo | |
# (send the envelopes) | |
git push | |
########################################### | |
# Conflicts look like below # | |
# fix them and remove the indicator lines # | |
# git add -A, git commit # | |
########################################### | |
<<<<<<<<< | |
(your version here) | |
========= | |
(server version here) | |
>>>>>>>>> |
Bare Minimum Git .gitignore files
Git Command Line Enhancements
There are Git enhancements available from the command line. We have packaged some of these enhancements in a Git repo, Iron Code Git Enhancements