...

Version Control Basics

Taltrums

June 15, 2023

Hi everyone, Sharing some useful git commands to use,


$ git init
Turn an existing directory into a git repository


$ git status
Tells what's going on


$ git add <filename>
adds files to staging area


$ git commit
Creates a new commit
- Write good commit messages!


$ git clone [url]
Clone (download) a repository that already exists on Github


$ git pull
Updates your current local working branch with all new commits 
from the remote branch
It is a combination of git fetch and git merge


$ git log
Shows a flattened log of history


$ git log - - all - - graph - - decorate
Visualize history as a DAG(Directed acyclic graph)