码迷,mamicode.com
首页 > 其他好文 > 详细

Git 常用命令

时间:2016-01-30 22:47:54      阅读:306      评论:0      收藏:0      [点我收藏+]

标签:

1. git init
2. git status
3. git add octocat.txt
    git rm --cached file_name
4. git commit -m "Add cute octocat story"
5. git add ‘*.txt‘
6. git log
7. git remote add origin https://github.com/try-git/try_git.git
8. git push -u origin master

    //The name of our remote is origin and the default local branch name is master. The -u tells Git to remember the parameters, so that next time we can simply run git push and Git will know what to do.

9. git pull origin master
10. git diff HEAD
11. git diff --staged
12. git reset octofamily/octodog.txt
13. git checkout -- octocat.txt
14. git branch clean_up
15. git checkout clean_upgit

16. git branch -d clean_up

      delete the branch

17. git push

 

BTW:

.gitignore 文件中的过滤的内容不可以加引号

Git 常用命令

标签:

原文地址:http://www.cnblogs.com/jcsz/p/5172133.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!