首页 > 其他 > 详细

[github] Usages

时间:2019-04-08 22:37:40      阅读:217      评论:0      收藏:0      [点我收藏+]

working with different files

working with branches

*check the current branch

```git branch``` will show all the branches of the current repo;
the starred one is the branch you are on
  • pull from another branch

    git pull is the shorthand for git pull <remote> <branch>, default git pull origin master

    use git remote -v for the remotes;

    use git remote add <remote name> <url> for setting new remote address

  • merge another branch

  • creating new branches

working with commits

  • check commits
git log # check previous commit 
  • revert the previous commit
git revert <unwanted previous commit hash>
  • check some history version of the code
git checkout <test commit hash> # checkout (not "pull" !) a history version of the code

[github] Usages

原文:https://www.cnblogs.com/manqing/p/10481020.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!