Git is a version control system that makes it easier to track changes to files. With git, you can figure out:
- What changed
- Who changed it
- Why it changed
A few of the most common git commands that you will encounter:
git init
- Start a repository in your current folder
git clone https://github.com/username/repofolder.git
- Download a .git repository from the internet (in this case GitHub) to your computer and get the latest snapshot of the repo
git status
- View the current status of your project
git branch <new-branch-name>
- Create a new branch name
git commit
- This saves a snapshot of your file in the form of a commit After a commit, you will see something like this in the terminal:
Elliots-MacBook-Pro:etch-a-sketch elliotmackinnon$ git commit -m "start clear function, bugs present"
[master b737a9c] start clear function, bugs present
1 file changed, 9 insertions(+), 1 deletion(-)
This is a good rundown of some basics of git, with more to follow!