Skip to content

Instantly share code, notes, and snippets.

@lucsmall
Created February 7, 2017 03:32
Show Gist options
  • Save lucsmall/1aafce49e63dfdf82241fb294de7c489 to your computer and use it in GitHub Desktop.
Save lucsmall/1aafce49e63dfdf82241fb294de7c489 to your computer and use it in GitHub Desktop.
cd ~/programs
# not a repository
git status
# so init a repository
git init
# note the __pycache__ folder
# we don't want to version that
git status
# create a .gitiginore file
__pycache__/
# git now igoring __pycache__/
git status
# add files to staging
git add .
# file now in staging area
git status
# now commit the files
git commit -a -m "initial commit"
# files at that version our now commited
# we can inspect history with
git log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment