Skip to content

Instantly share code, notes, and snippets.

@vmiheer
Created September 19, 2013 17:35
Show Gist options
  • Save vmiheer/6626962 to your computer and use it in GitHub Desktop.
Save vmiheer/6626962 to your computer and use it in GitHub Desktop.
git config --global user.name "<name>"
git config --global user.email "<email>"
cat ~/.gitconfig
mkdir git-demo
cd git-demo
git init
touch hello.txt
git add .
git commit -a
vi hello.txt
git commit -a -m "some message"
git log
git status
vi hello.txt
git diff
git diff commit_hash
vi hello.txt
git diff commit_hash_1 commit_hash_2
git branch intro
touch intro.txt
vi intro.txt
git checkout master
git branch
git branch -r
git branch -l
git merge intro
git branch -d intro
git branch -D intro
git rm --cached /path/to/the/folder_or_file
# Next step
# Install one of thses tools - tig/gitk/git-gui
# try.github.io
# stackoverflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment