轻松教你Git指令。
http://plog.longwin.com.tw/my_note-unix/2009/05/19/git-learn-initial-command-2009
如果在add之后,想放弃,使用
?
git reset .
?
就会将指针放弃了。
?
1.遇到冲突的解决
git push --rebase
git mergetool -y
git rebase --continue
?
?
2.废弃本地临时提交,没有git push
git reset --hard c91ecbf92f242827ad0f46fb8fd19bafe4919185
?
3.删除重建一个分支,修改
??git log
??git status
??git log
??git checkout -b new 0cfb3fc9e61eb2316763247a565ffd140cb74295
???git status
???git branch -av
???git branch -d master?
???git branch -D master?
???git branch -h
??git branch -m new master
???git branch
???git log
?
?
git pullgit push
注意:git diff 不带路径参数将查看所有文件的修改
git add . 在文件很多时,可以一次将全部文件添加以待提交(commit), 但删除文件需要使用git rm app/../user.rb,路径参数不能省略
在push之前必须git pull命令, 否则可能覆盖别人的修改(据说),这个我没有尝试过
解决git换行的问题:http://elrond.iteye.com/blog/680575