-
Notifications
You must be signed in to change notification settings - Fork 6
just enough git for add2012
https://help.github.com/articles/set-up-git
git config --global user.name "my name"
?
git config --global push.default upstream
? ?
Checkout this blog http://devyard.wordpress.com/2012/09/04/best-git-tools-configuration-tips/
Sample configs: https://github.com/jakubnabrdalik/gitkurwa/blob/master/config
git checkout master
?
git checkout -b feature_name
?
git push -u origin feature_name
? ?
git add <you_files>
?
git commit -m "my change"
git push
git pull
git merge --no-ff remotes/origin/master
?
if you have some conflicts:
- resolve them in you favorite merging tool
-
git add .
add files after merge -
git commit -m "merge message"
commit merge
git push
git checkout master
git merge --no-ff remotes/origin/feature_name
git push
git reset --soft HEAD^
git log --oneline
show commit hash
git revert ab51bc32
revert commit with given hash ?
git push
push reverting commit
git reset --hard HEAD
!
##More Resources
Here are some other things that you can read about git
:
- "Git Ready":http://gitready.com/
- "Git for Computer Scientists":http://eagain.net/articles/git-for-computer-scientists/
- "Git by example":http://sysmonblog.co.uk/misc/git_by_example/
- "Git Magic":http://www-cs-students.stanford.edu/~blynn/gitmagic/
- "ProGit":http://progit.org
- "A Gaggle of Git Tips":http://www.viget.com/extend/a-gaggle-of-git-tips/