Skip to content

Instantly share code, notes, and snippets.

@salcode
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salcode/66981f33e71a724fbf50 to your computer and use it in GitHub Desktop.
Save salcode/66981f33e71a724fbf50 to your computer and use it in GitHub Desktop.
Bare Minimum Git Cheatsheet
# -----------------------------------------------------------------
# Bare Minimum Git Cheatsheet
# http://ironco.de/bare-minimum-git/
# ver 20140411
# -----------------------------------------------------------------
# initialize a git repo
git init
# add .gitignore file into project root
# the first line is for a WordPress project
# the second line is for a general web project
curl -O https://gist.githubusercontent.com/salcode/9940509/raw/.gitignore
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# add all new or changed files
# (put them in the envelope)
git add -A
git status
# commit your changes with a label
# (seal the envelope)
git commit -m 'fix misspelled name'
git status
# pull changes from the shared repo
git pull --rebase
git status
# push your changes to the shared repo
# (send the envelopes)
git push
###########################################
# Conflicts look like below #
# fix them and remove the indicator lines #
# git add -A, git commit #
###########################################
<<<<<<<<<
(your version here)
=========
(server version here)
>>>>>>>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment