- Create a repository
git init project
- Configuration
git config user.email
git config user.name
git config --global user.name "Tim Berglund"
git config --global user.email "[email protected]"
git config --global color.ui auto
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all"
- Adding files
git status
git add <filename>
- Commiting
git commit -m "Initial commit"
- History
git log
git log -1
git log --stat
git log --patch
- Branching
git branch <branchname>
git checkout <branchname>
- Tags
git tag TAGNAME
git tag -a TAGNAME
- Merge conflicts
git checkout master
git merge feature
- Collaboration on the GitHub
- Create repo on GitHub
- Add remote
git remote add origin https://github.com/username/repo.git
git push -u origin master
git pull
git fetch
Created
October 27, 2012 15:32
-
-
Save tlberglund/3965088 to your computer and use it in GitHub Desktop.
Git Notes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment