(how to make sure we don't lose them)
NOTES: TADA! No notes, really
=====
- Create things
- Save things
- Edit things
- Save the thing again
=====
NOTES:
- Common problem when working on a project
- 2 or more people working on the same file
///// world_domination.py
import dominator
dominator.dominate(scope='world')
dominator.evil_laugh('ha-ha-ha')
/////
=====
NOTES: Centralized Version Control Systems
=====
Distributed version control system
=====
Created by Linus Torvalds for the linux kernel around 2005
Replaces the proprietary DVCS used for maintaining the linux kernel
NOTES: BitKeeper is a proprietary Distributed VCS, which the linux development community was able to use for free.
=====
===== Used at companies such as:
- Netflix
- Microsoft
- IBM
=====
NOTES: Repository is where all the code is saved, code history NOT the current running code, but just a directory where people copy the code from
=====
/////
NOTES:
- No latency overhead
- Uses your PC's computing power to calculate and show the difference in snapshots from months or years ago
/////
SHA-1 hashing NOTES: Everything is check-summed (hashed) before it is stored It is impossible to change anything without git knowing about it
/////
*you can lose data, but only if you really mess things up
/////
- Working directory (Local)
- Staging
- .git repository (Pushed)
=====
(https://git-scm.com/) Initialize git on your current project
git init
///// NOTE: It is important to initialize git on the highest folder in your directory structure
+--dwglib
| +--daine_utils
| +--common_utils
+--another_lib
Please init git on dwglib instead of daine_utils or common_utils
+--dwglib
| +--.git/
| +--daine_utils
| +--common_utils
+--another_lib
=====
/////
NOTES: Git is a way to keep your files organized /////
git status
/////
git add
/////
.gitignore
/////
/////
git commit
/////
not recommended
/////
# Rename myoldfile.py to mynewfile.py
git rm myoldfile.py
git add mynewfile.py
``` git mv myoldfile.py mynewfile.py ```
=====
git log
=====
///// ///// ///// ///// ![](images/git staged.PNG) ///// ![](images/git pre-commit.PNG) ///// ![](images/git log.PNG) ///// ///// ![](images/git commit changes.PNG)