28 lines
		
	
	
		
			1003 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			1003 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| ---
 | |
| title: gitguide
 | |
| date: "2022-04-26T13:48:03-07:00"
 | |
| categories:
 | |
| - tech
 | |
| draft: true
 | |
| ---
 | |
| Git is a version control software, a type of software the keeps track of versions of files in a directory. It was created by Linus Torvalds (the Linux guy) because he needed a way to easily track changes while maintaining the Linux source code
 | |
| 
 | |
| ## Basic Workflow
 | |
| 
 | |
|   Git tracks changes (i.e. versions) of your files in a repository. A repository is a directory on your computer that contains your files and git's metadata about the changes. To turn a directory on your computer into a repository, navigate to your directory in a terminal and run this command.
 | |
|     git init .
 | |
| This has created an empty repo in the directory. The next step is to add some files.
 | |
| - commit, pull, push, remote
 | |
| 
 | |
| ## Branching
 | |
| 
 | |
| - checkout, merge
 | |
| 
 | |
| ## Best Practices
 | |
| 
 | |
| TODO: how to protect sensitive information (passwords, API keys, etc)
 | |
| 
 | |
| TODO: you've committed some sensitive information, now what?
 | |
|     - undo commit
 | |
|     - if you've pushed
 |