SITCON 2013, 2014 總召
git
確認sudo apt-get install git
sudo yum install git
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global color.ui true
git config --global core.editor vim
git config --global alias.co commit
git config --global alias.lg "log --color --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
--global
?Halloween Bash Profile Generator
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/(\1)/'
}
export PS1="\h:\W \u\$(parse_git_branch)$ "
git help <command>
git init
touch README.md
git status
git add README.md
git add .
git rm --cached <file>
git reset <file>
git status
git diff
git commit
git commit -m "first commit"
git commit --amend
git log
git show <revisions>
git rm <file>
git mv <file>
git checkout <revision>
git checkout <revision> <file>
git stash
git stash list
git stash pop
git reset <revision>
git reset --hard <revision>
git remote add origin https://github.com/denny0223/workshop.git
git remote
git remote show origin
git push -u origin master
git push origin master
git push
git branch
git branch -a
git branch -v
git branch -vv
git clone
git pull
git fetch
+ git merge
git pull --rebase