Git is a Version Control System (VCS) that allows you to save work on your project, and reference previous states of a project when needed.
- Github Account
- Git loaded onto personal terminal
- Working keyboard
- Basic ability to follow directions
mkdir <folder_name>
creates a folder on your terminaltouch <filename.txt>
creates a text file within your foldergit init
tells git to begin watching your new folder of filesgit commit -m 'Initial commit'
Git begins tracking your folder and all its contentsatom <filename.txt>
to edit the text file in atomadd <filename.txt>
adds the new version of the file to the staging areagit commit -m 'Version two with detail'
sends the new version to the final respository with a detailed message of what changedgit push
how you send the working repository to Github to be shared and enjoyed by all
virginialadd~/git_homework[master !?+]$ touch example_one.txt
virginialadd~/git_homework[master !?+]$ git init
Reinitialized existing Git repository in /Users/virginialadd/git_homework/.git/
virginialadd~/git_homework[master !?+]$ git commit -m"Initial commit"
[master 4681ae2] Initial commit
1 file changed, 1 insertion(+)
create mode 160000 best_animals
virginialadd~/git_homework[master !?*]$ atom example_one.txt
virginialadd~/git_homework[master !?*]$ git add example_one.txt
virginialadd~/git_homework[master !?+*]$
Modified / Working
The first level where edits are made
You modify files in your working tree
Staged
The second level where you double check your work, and certify that it is ready as is
You selectively stage just those chanegs you want to be part of your next commit, which adds only those changes to the staging area
Committed
The final level where all the finished work is stored
You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory
Maxx A Support Animal to help you on your Journey