Skip to content

Instantly share code, notes, and snippets.

@mkoby
Created July 6, 2012 16:49
Show Gist options
  • Save mkoby/3061287 to your computer and use it in GitHub Desktop.
Save mkoby/3061287 to your computer and use it in GitHub Desktop.
Git Basics
mkdir cctv_git #Make directory
cd cctv_git #change to newly crated directory
git init #Create git repository in directory
#Configure Git
git config --global user.name “CodeCasts.tv”
git config --global user.email [email protected]
git config --list #just to confirm that our settings were applied
#Create A README file with some contents
echo "Version Control with Git by CodeCasts.tv" > README
git status #Shows README file as file not yet added to the repo
git add README #Stages README file to be committed to the repository
git status #shows the README file as added but not yet committed
#Commit the README file to the git repository
git commit -m “Added README file”
git status #Check status to see that the README file is no longer waiting to be committed
git log #Shows log file, and we see our README file, with the commit message from above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment